Skip to content

Commit ab3810c

Browse files
authored
Merge pull request #43744 from cici37/fixEscape
Remove the inaccurate description
2 parents 5855298 + fc92afd commit ab3810c

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

content/en/docs/reference/access-authn-authz/validating-admission-policy.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -291,33 +291,6 @@ variables as well as some other useful variables:
291291
The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from
292292
the root of the object. No other metadata properties are accessible.
293293
294-
Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.
295-
Accessible property names are escaped according to the following rules when accessed in the
296-
expression:
297-
298-
| escape sequence | property name equivalent |
299-
| ----------------------- | -----------------------|
300-
| `__underscores__` | `__` |
301-
| `__dot__` | `.` |
302-
|`__dash__` | `-` |
303-
| `__slash__` | `/` |
304-
| `__{keyword}__` | [CEL RESERVED keyword](https://github.com/google/cel-spec/blob/v0.6.0/doc/langdef.md#syntax) |
305-
306-
{{< note >}}
307-
A **CEL reserved** keyword only needs to be escaped if the token is an exact match
308-
for the reserved keyword.
309-
For example, `int` in the word “sprint” would not be escaped.
310-
{{< /note >}}
311-
312-
Examples on escaping:
313-
314-
|property name | rule with escaped property name |
315-
| ----------------|-----------------------------------|
316-
| namespace | `object.__namespace__ > 0` |
317-
| x-prop | `object.x__dash__prop > 0` |
318-
| redact__d | `object.redact__underscores__d > 0` |
319-
| string | `object.startsWith('kube')` |
320-
321294
Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1].
322295
Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:
323296

0 commit comments

Comments
 (0)