@@ -876,7 +876,7 @@ spec:
876
876
validations:
877
877
- expression: "self.name.startsWith('xyz-')"
878
878
name: name-prefix
879
- messageExpression : "'{} must start with xyz-'.format([self.name]) "
879
+ message : "self.name must start with xyz-"
880
880
reason: Unauthorized
881
881
- expression: "self.name.contains('bad')"
882
882
name: bad-name
@@ -885,7 +885,7 @@ spec:
885
885
reason: Invalid
886
886
- expression: "self.name.contains('suspicious')"
887
887
name: suspicious-name
888
- messageExpression : "'{} contains suspicious'.format([self.name]) "
888
+ message : "'self.name contains suspicious'"
889
889
code: 400
890
890
reason: Invalid
891
891
` ` `
@@ -2880,7 +2880,7 @@ For example, to validate all containers:
2880
2880
validations:
2881
2881
- scope: "spec.containers[*]"
2882
2882
expression: "scope.name.startsWith('xyz-')"
2883
- messageExpression : "'{} does not start with \ ' xyz\' -'.format([scope.name]) "
2883
+ message : "scope.name does not start with 'xyz' "
2884
2884
` ` `
2885
2885
2886
2886
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.:
2915
2915
validations:
2916
2916
- scopes: ["spec.containers[*]", "initContainers[*]", "spec.ephemeralContainers[*]"]
2917
2917
expression: "scope.name.startsWith('xyz-')"
2918
- messageExpression : "'{} does not start with \ ' xyz\' '.format([scope.name]) "
2918
+ message : "scope.name does not start with 'xyz' "
2919
2919
` ` `
2920
2920
2921
2921
But feedback was this is signficantly more difficult to understand.
0 commit comments