Skip to content

Commit 5eda75b

Browse files
committed
documentation
On-behalf-of: @SAP [email protected]
1 parent 23705f7 commit 5eda75b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/content/publish-resources/index.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ spec:
236236
- regex: ...
237237
template: ...
238238
delete: ...
239+
cel: ...
239240
```
240241

241242
#### Regex
@@ -273,6 +274,25 @@ delete:
273274
This mutation simply removes the value at the given path from the document. JSON path is the
274275
usual 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

278298
The processing of resources on the service cluster often leads to additional resources being

0 commit comments

Comments
 (0)