File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
keps/sig-api-machinery/3716-webhook-predicates Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -234,17 +234,18 @@ type Predicate struct {
234
234
// Examples:
235
235
// - Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"}
236
236
// - Expression accessing a property named "x-p
237
- <!--
238
- What are the risks of this proposal, and how do we mitigate? Think broadly.
239
- For example, consider both security and how this will impact the larger
240
- Kubernetes ecosystem.
241
-
242
- How will security be reviewed, and by whom?
243
-
244
- How will UX be reviewed, and by whom?
245
-
246
- Consider including folks who also work outside the SIG or subproject.
247
- -->
237
+ // - Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"}
238
+ //
239
+ // Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1].
240
+ // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:
241
+ // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and
242
+ // non-intersecting elements in `Y` are appended, retaining their partial order.
243
+ // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values
244
+ // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with
245
+ // non-intersecting keys are appended, retaining their partial order.
246
+ // Required.
247
+ Expression string `json:"expression"`
248
+ }
248
249
```
249
250
250
251
The predicate expression has access to the contents of the ` AdmissionRequest ` object (exposed as the
You can’t perform that action at this time.
0 commit comments