Skip to content

Commit 58d5c4a

Browse files
authored
Merge pull request kubernetes#3025 from jpbetz/rename-validators
Rename x-kubernetes-validators to x-kubernetes-validations
2 parents 3e4a4e6 + 10876ad commit 58d5c4a

File tree

1 file changed

+9
-9
lines changed
  • keps/sig-api-machinery/2876-crd-validation-expression-language

1 file changed

+9
-9
lines changed

keps/sig-api-machinery/2876-crd-validation-expression-language/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ satisfy a large set of remaining uses cases that none of the above can solve.
206206
For example, cross-field validation use cases can only be solved using
207207
expressions or webhooks.
208208

209-
`x-kubernetes-validator` extension will be added to CRD structural schemas to allow CEL validation expressions.
209+
`x-kubernetes-validations` extension will be added to CRD structural schemas to allow CEL validation expressions.
210210

211211
```yaml
212212
apiVersion: apiextensions.k8s.io/v1
@@ -217,7 +217,7 @@ kind: CustomResourceDefinition
217217
type: object
218218
properties:
219219
spec:
220-
x-kubernetes-validator:
220+
x-kubernetes-validations:
221221
- rule: "minReplicas <= maxReplicas"
222222
message: "minReplicas cannot be larger than maxReplicas"
223223
type: object
@@ -233,7 +233,7 @@ kind: CustomResourceDefinition
233233
- Each validation rule has an optional 'message' field for the error message that
234234
will be surfaced when the validation rule evaluates to false.
235235
236-
- The validator will be scoped to the location of the `x-kubernetes-validator`
236+
- The validator will be scoped to the location of the `x-kubernetes-validations`
237237
extension in the schema. In the above example, the validator is scoped to the
238238
`spec` field. `self` will be used to represent the name of the field which the validator
239239
is scoped to.
@@ -436,7 +436,7 @@ Similar to CEL for General Admission Control, CEL could also be used to author C
436436
While we believe CEL should be sufficient. If another language we introduce in the future, it would be supported:
437437

438438
- Add an identifier for each expression language.
439-
- Add a `type` field specified to `x-kubernetes-validator` (it would default to `cel`).
439+
- Add a `type` field specified to `x-kubernetes-validations` (it would default to `cel`).
440440
- Implement the validation support for the languages or even allow 3rd party validators to have a
441441
way to inline their validation rules in CRDs?
442442

@@ -566,8 +566,8 @@ No, default behavior is the same.
566566

567567
Yes, disabling the feature will result in validation expressions being ignored.
568568

569-
We will add a unit test that ensures that if the featuregate is off, but the x-kubernetes-validator
570-
field is present, custom resource definition updates that do not add additional x-kubernetes-validator
569+
We will add a unit test that ensures that if the featuregate is off, but the x-kubernetes-validations
570+
field is present, custom resource definition updates that do not add additional x-kubernetes-validations
571571
fields will succeed.
572572

573573
###### What happens if we reenable the feature if it was previously rolled back?
@@ -586,7 +586,7 @@ This section must be completed when targeting beta to a release.
586586

587587
###### How can a rollout or rollback fail? Can it impact already running workloads?
588588

589-
`x-kubernetes-validator` it not currently allowed in the OpenAPI schemas defined in Custom Resource
589+
`x-kubernetes-validations` it not currently allowed in the OpenAPI schemas defined in Custom Resource
590590
Definitions. This creates a rollout issue: Any CRDs that are defined using this new field will
591591
be invalid according to versions of Kubernetes that pre-date the introduction of the field.
592592

@@ -615,7 +615,7 @@ This section must be completed when targeting beta to a release.
615615

616616
###### How can an operator determine if the feature is in use by workloads?
617617

618-
Check if there exist any custom resource definition with the x-kubernetes-validator field in the OpenAPIv3 schema.
618+
Check if there exist any custom resource definition with the x-kubernetes-validations field in the OpenAPIv3 schema.
619619

620620
###### How can someone using this feature know that it is working for their instance?
621621

@@ -709,7 +709,7 @@ For each of them, fill in the following information by copying the below templat
709709

710710
### Beta
711711

712-
Code that allows x-kubernetes-validator to be included (but ignored) in CRDs is backported all
712+
Code that allows x-kubernetes-validations to be included (but ignored) in CRDs is backported all
713713
supported Kubernetes versions. Also, we should make an assessment of how much support we have in
714714
older kubernetes versions for this feature before we promote to Beta, delaying promotion as needed
715715
to minimize negative impact to ecosystem.

0 commit comments

Comments
 (0)