File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed
Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ interceptors:
6363 name : cel
6464 params :
6565 - name : overlays
66- values :
66+ value :
6767 - key : count_plus_1
6868 expression : " body.count + 1.0"
6969 - key : count_plus_2
@@ -91,8 +91,8 @@ interceptors:
9191 - ref :
9292 name : cel
9393 params :
94- - name : overlays:
95- values :
94+ - name : overlays
95+ value :
9696 - key : bad_measure_times_3
9797 expression : " body.measure * 3"
9898` ` `
@@ -133,15 +133,17 @@ You can use this in filters in the following ways:
133133
134134You can also parse additional data from each of the labels :
135135` ` ` yaml
136- overlays:
137- - key: suffixes
138- expression: "body.labels.map(x, x.name.substring(x.name.lastIndexOf('-')+1))"
136+ - name: overlays
137+ value:
138+ - key: suffixes
139+ expression: "body.labels.map(x, x.name.substring(x.name.lastIndexOf('-')+1))"
139140` ` `
140141This yields an array of `["a", "b"]` in the `suffixes` extension key.
141142` ` ` yaml
142- overlays:
143- - key: filtered
144- expression: "body.labels.filter(x, x.name.endsWith('-b'))"
143+ - name: overlays
144+ value:
145+ - key: filtered
146+ expression: "body.labels.filter(x, x.name.endsWith('-b'))"
145147` ` `
146148This would add an extensions key `filtered` with only one of the labels.
147149` ` ` yaml
@@ -184,8 +186,11 @@ you will need to explicitly convert it to a CEL string.
184186
185187` ` ` yaml
186188interceptors:
187- - cel:
188- overlays:
189+ - ref:
190+ name: "cel"
191+ params:
192+ - name: "overlays"
193+ value:
189194 - key: base64_decoded
190195 expression: "string(base64.decode(body.b64Value))"
191196` ` `
You can’t perform that action at this time.
0 commit comments