Skip to content

Commit c408bc8

Browse files
committed
Fix API definition
1 parent 2fa817b commit c408bc8

File tree

1 file changed

+12
-11
lines changed
  • keps/sig-api-machinery/3716-webhook-predicates

1 file changed

+12
-11
lines changed

keps/sig-api-machinery/3716-webhook-predicates/README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -234,17 +234,18 @@ type Predicate struct {
234234
// Examples:
235235
// - Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"}
236236
// - 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+
}
248249
```
249250

250251
The predicate expression has access to the contents of the `AdmissionRequest` object (exposed as the

0 commit comments

Comments
 (0)