Skip to content

Commit d18660c

Browse files
authored
Fix for CRD validation (#3446)
1 parent 78f627e commit d18660c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/config_examples/customResourceDefinitions/incubator/customresourcedefinitions.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,8 @@ spec:
400400
minimum: 1
401401
maximum: 65535
402402
x-kubernetes-validations:
403-
- rule: "self.partition != 'Common'"
404-
message: "Partition cannot be set as Common"
403+
- rule: "!has(self.partition) || self.partition != 'Common'"
404+
message: "The partition cannot be 'Common' if specified."
405405
status:
406406
type: object
407407
properties:
@@ -761,8 +761,8 @@ spec:
761761
- pool
762762
- mode
763763
x-kubernetes-validations:
764-
- rule: "self.partition != 'Common'"
765-
message: "Partition cannot be set as Common"
764+
- rule: "!has(self.partition) || self.partition != 'Common'"
765+
message: "The partition cannot be 'Common' if specified."
766766
status:
767767
type: object
768768
properties:
@@ -981,8 +981,8 @@ spec:
981981
type: object
982982
type: object
983983
x-kubernetes-validations:
984-
- rule: "self.partition != 'Common'"
985-
message: "Partition cannot be set as Common"
984+
- rule: "!has(self.partition) || self.partition != 'Common'"
985+
message: "The partition cannot be 'Common' if specified."
986986
status:
987987
type: object
988988
properties:

0 commit comments

Comments
 (0)