From 002985c690379f236e97f5436e2baf6d9e5f3ede Mon Sep 17 00:00:00 2001 From: cici37 Date: Tue, 1 Mar 2022 13:01:47 -0800 Subject: [PATCH] Reduce confusion by fixing field name in samples. --- .../custom-resources/custom-resource-definitions.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md b/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md index e4c5e39915..6b30143470 100644 --- a/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md +++ b/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md @@ -725,7 +725,7 @@ For example: properties: spec: type: object - x-kubernetes-validation-rules: + x-kubernetes-validations: - rule: "self.minReplicas <= self.replicas" message: "replicas should be greater than or equal to minReplicas." - rule: "self.replicas <= self.maxReplicas" @@ -829,7 +829,7 @@ Xref: [Supported evaluation on CEL](https://github.com/google/cel-spec/blob/v0.6 ... openAPIV3Schema: type: object - x-kubernetes-validation-rules: + x-kubernetes-validations: - rule: "self.status.availableReplicas >= self.spec.minReplicas" properties: spec: @@ -856,7 +856,7 @@ Xref: [Supported evaluation on CEL](https://github.com/google/cel-spec/blob/v0.6 properties: spec: type: object - x-kubernetes-validation-rules: + x-kubernetes-validations: - rule: "has(self.foo)" properties: ... @@ -874,7 +874,7 @@ Xref: [Supported evaluation on CEL](https://github.com/google/cel-spec/blob/v0.6 properties: spec: type: object - x-kubernetes-validation-rules: + x-kubernetes-validations: - rule: "self['xyz'].foo > 0" additionalProperties: ... @@ -894,7 +894,7 @@ Xref: [Supported evaluation on CEL](https://github.com/google/cel-spec/blob/v0.6 ... foo: type: array - x-kubernetes-validation-rules: + x-kubernetes-validations: - rule: "size(self) == 1" items: type: string @@ -912,7 +912,7 @@ Xref: [Supported evaluation on CEL](https://github.com/google/cel-spec/blob/v0.6 ... foo: type: integer - x-kubernetes-validation-rules: + x-kubernetes-validations: - rule: "self > 0" ``` Examples: