File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
docs/content/publish-resources Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,7 @@ spec:
236236 - regex: ...
237237 template: ...
238238 delete: ...
239+ cel: ...
239240` ` `
240241
241242# ### Regex
@@ -273,6 +274,25 @@ delete:
273274This mutation simply removes the value at the given path from the document. JSON path is the
274275usual path, without a leading dot.
275276
277+ # ### CEL Expressions
278+
279+ ` ` ` yaml
280+ cel:
281+ path: "metadata.resourceVersion"
282+ expression: "value + 42"
283+ ` ` `
284+
285+ This mutation applies a [CEL expression](https://cel.dev/) to a selected value (via `path`) in the
286+ source object. For this mutation the syncagent will first get the current value at the `path` from
287+ the Kubernetes object, then applies the CEl expression to it and updates the document with the
288+ resulting value.
289+
290+ Inside the CEL expression, the following variables are available :
291+
292+ * `value` is the value selected by the `path`
293+ * `self` is the object to modify
294+ * `other` is the copy of this object on the other side of the sync
295+
276296# ## Related Resources
277297
278298The processing of resources on the service cluster often leads to additional resources being
You can’t perform that action at this time.
0 commit comments