@@ -139,11 +139,14 @@ type LocalValueRetention struct {
139139 // to the desired specification.
140140 //
141141 // The script should implement a function as follows:
142- // luaScript: >
143- // function Retain(desiredObj, observedObj)
144- // desiredObj.spec.fieldFoo = observedObj.spec.fieldFoo
145- // return desiredObj
146- // end
142+ //
143+ // ```
144+ // luaScript: >
145+ // function Retain(desiredObj, observedObj)
146+ // desiredObj.spec.fieldFoo = observedObj.spec.fieldFoo
147+ // return desiredObj
148+ // end
149+ // ```
147150 //
148151 // The content of the LuaScript needs to be a whole function including both
149152 // declaration and implementation.
@@ -167,16 +170,19 @@ type ReplicaResourceRequirement struct {
167170 // replica as well as resource requirements
168171 //
169172 // The script should implement a function as follows:
170- // luaScript: >
171- // function GetReplicas(desiredObj)
172- // replica = desiredObj.spec.replicas
173- // requirement = {}
174- // requirement.nodeClaim = {}
175- // requirement.nodeClaim.nodeSelector = desiredObj.spec.template.spec.nodeSelector
176- // requirement.nodeClaim.tolerations = desiredObj.spec.template.spec.tolerations
177- // requirement.resourceRequest = desiredObj.spec.template.spec.containers[1].resources.limits
178- // return replica, requirement
179- // end
173+ //
174+ // ```
175+ // luaScript: >
176+ // function GetReplicas(desiredObj)
177+ // replica = desiredObj.spec.replicas
178+ // requirement = {}
179+ // requirement.nodeClaim = {}
180+ // requirement.nodeClaim.nodeSelector = desiredObj.spec.template.spec.nodeSelector
181+ // requirement.nodeClaim.tolerations = desiredObj.spec.template.spec.tolerations
182+ // requirement.resourceRequest = desiredObj.spec.template.spec.containers[1].resources.limits
183+ // return replica, requirement
184+ // end
185+ // ```
180186 //
181187 // The content of the LuaScript needs to be a whole function including both
182188 // declaration and implementation.
@@ -198,11 +204,14 @@ type ReplicaResourceRequirement struct {
198204type ReplicaRevision struct {
199205 // LuaScript holds the Lua script that is used to revise replicas in the desired specification.
200206 // The script should implement a function as follows:
201- // luaScript: >
202- // function ReviseReplica(desiredObj, desiredReplica)
203- // desiredObj.spec.replicas = desiredReplica
204- // return desiredObj
205- // end
207+ //
208+ // ```
209+ // luaScript: >
210+ // function ReviseReplica(desiredObj, desiredReplica)
211+ // desiredObj.spec.replicas = desiredReplica
212+ // return desiredObj
213+ // end
214+ // ```
206215 //
207216 // The content of the LuaScript needs to be a whole function including both
208217 // declaration and implementation.
@@ -222,12 +231,15 @@ type ReplicaRevision struct {
222231type StatusReflection struct {
223232 // LuaScript holds the Lua script that is used to get the status from the observed specification.
224233 // The script should implement a function as follows:
225- // luaScript: >
226- // function ReflectStatus(observedObj)
227- // status = {}
228- // status.readyReplicas = observedObj.status.observedObj
229- // return status
230- // end
234+ //
235+ // ```
236+ // luaScript: >
237+ // function ReflectStatus(observedObj)
238+ // status = {}
239+ // status.readyReplicas = observedObj.status.observedObj
240+ // return status
241+ // end
242+ // ```
231243 //
232244 // The content of the LuaScript needs to be a whole function including both
233245 // declaration and implementation.
@@ -247,13 +259,16 @@ type StatusAggregation struct {
247259 // LuaScript holds the Lua script that is used to aggregate decentralized statuses
248260 // to the desired specification.
249261 // The script should implement a function as follows:
250- // luaScript: >
251- // function AggregateStatus(desiredObj, statusItems)
252- // for i = 1, #statusItems do
253- // desiredObj.status.readyReplicas = desiredObj.status.readyReplicas + items[i].readyReplicas
254- // end
255- // return desiredObj
256- // end
262+ //
263+ // ```
264+ // luaScript: >
265+ // function AggregateStatus(desiredObj, statusItems)
266+ // for i = 1, #statusItems do
267+ // desiredObj.status.readyReplicas = desiredObj.status.readyReplicas + items[i].readyReplicas
268+ // end
269+ // return desiredObj
270+ // end
271+ // ```
257272 //
258273 // The content of the LuaScript needs to be a whole function including both
259274 // declaration and implementation.
@@ -273,12 +288,15 @@ type HealthInterpretation struct {
273288 // LuaScript holds the Lua script that is used to assess the health state of
274289 // a specific resource.
275290 // The script should implement a function as follows:
276- // luaScript: >
277- // function InterpretHealth(observedObj)
278- // if observedObj.status.readyReplicas == observedObj.spec.replicas then
279- // return true
280- // end
281- // end
291+ //
292+ // ```
293+ // luaScript: >
294+ // function InterpretHealth(observedObj)
295+ // if observedObj.status.readyReplicas == observedObj.spec.replicas then
296+ // return true
297+ // end
298+ // end
299+ // ```
282300 //
283301 // The content of the LuaScript needs to be a whole function including both
284302 // declaration and implementation.
@@ -299,20 +317,23 @@ type DependencyInterpretation struct {
299317 // LuaScript holds the Lua script that is used to interpret the dependencies of
300318 // a specific resource.
301319 // The script should implement a function as follows:
302- // luaScript: >
303- // function GetDependencies(desiredObj)
304- // dependencies = {}
305- // if desiredObj.spec.serviceAccountName ~= nil and desiredObj.spec.serviceAccountName ~= "default" then
306- // dependency = {}
307- // dependency.apiVersion = "v1"
308- // dependency.kind = "ServiceAccount"
309- // dependency.name = desiredObj.spec.serviceAccountName
310- // dependency.namespace = desiredObj.namespace
311- // dependencies[1] = {}
312- // dependencies[1] = dependency
313- // end
314- // return dependencies
315- // end
320+ //
321+ // ```
322+ // luaScript: >
323+ // function GetDependencies(desiredObj)
324+ // dependencies = {}
325+ // if desiredObj.spec.serviceAccountName ~= nil and desiredObj.spec.serviceAccountName ~= "default" then
326+ // dependency = {}
327+ // dependency.apiVersion = "v1"
328+ // dependency.kind = "ServiceAccount"
329+ // dependency.name = desiredObj.spec.serviceAccountName
330+ // dependency.namespace = desiredObj.namespace
331+ // dependencies[1] = {}
332+ // dependencies[1] = dependency
333+ // end
334+ // return dependencies
335+ // end
336+ // ```
316337 //
317338 // The content of the LuaScript needs to be a whole function including both
318339 // declaration and implementation.
0 commit comments