Skip to content

Commit 3448066

Browse files
Use field names instead of field values for some examples.
1 parent 39263f5 commit 3448066

File tree

1 file changed

+4
-4
lines changed
  • keps/sig-api-machinery/3488-cel-admission-control

1 file changed

+4
-4
lines changed

keps/sig-api-machinery/3488-cel-admission-control/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ spec:
876876
validations:
877877
- expression: "self.name.startsWith('xyz-')"
878878
name: name-prefix
879-
messageExpression: "'{} must start with xyz-'.format([self.name])"
879+
message: "self.name must start with xyz-"
880880
reason: Unauthorized
881881
- expression: "self.name.contains('bad')"
882882
name: bad-name
@@ -885,7 +885,7 @@ spec:
885885
reason: Invalid
886886
- expression: "self.name.contains('suspicious')"
887887
name: suspicious-name
888-
messageExpression: "'{} contains suspicious'.format([self.name])"
888+
message: "'self.name contains suspicious'"
889889
code: 400
890890
reason: Invalid
891891
```
@@ -2880,7 +2880,7 @@ For example, to validate all containers:
28802880
validations:
28812881
- scope: "spec.containers[*]"
28822882
expression: "scope.name.startsWith('xyz-')"
2883-
messageExpression: "'{} does not start with \'xyz\'-'.format([scope.name])"
2883+
message: "scope.name does not start with 'xyz'"
28842884
```
28852885

28862886
To make it possible to access the path information in the scope, we can offer a
@@ -2915,7 +2915,7 @@ Note: We considered extending to a list of scopes, e.g.:
29152915
validations:
29162916
- scopes: ["spec.containers[*]", "initContainers[*]", "spec.ephemeralContainers[*]"]
29172917
expression: "scope.name.startsWith('xyz-')"
2918-
messageExpression: "'{} does not start with \'xyz\''.format([scope.name])"
2918+
message: "scope.name does not start with 'xyz'"
29192919
```
29202920

29212921
But feedback was this is signficantly more difficult to understand.

0 commit comments

Comments
 (0)