@@ -206,7 +206,7 @@ satisfy a large set of remaining uses cases that none of the above can solve.
206
206
For example, cross-field validation use cases can only be solved using
207
207
expressions or webhooks.
208
208
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.
210
210
211
211
``` yaml
212
212
apiVersion : apiextensions.k8s.io/v1
@@ -217,7 +217,7 @@ kind: CustomResourceDefinition
217
217
type : object
218
218
properties :
219
219
spec :
220
- x-kubernetes-validator :
220
+ x-kubernetes-validations :
221
221
- rule : " minReplicas <= maxReplicas"
222
222
message : " minReplicas cannot be larger than maxReplicas"
223
223
type : object
@@ -233,7 +233,7 @@ kind: CustomResourceDefinition
233
233
- Each validation rule has an optional 'message' field for the error message that
234
234
will be surfaced when the validation rule evaluates to false.
235
235
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 `
237
237
extension in the schema. In the above example, the validator is scoped to the
238
238
` spec` field. `self` will be used to represent the name of the field which the validator
239
239
is scoped to.
@@ -436,7 +436,7 @@ Similar to CEL for General Admission Control, CEL could also be used to author C
436
436
While we believe CEL should be sufficient. If another language we introduce in the future, it would be supported :
437
437
438
438
- 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`).
440
440
- Implement the validation support for the languages or even allow 3rd party validators to have a
441
441
way to inline their validation rules in CRDs?
442
442
@@ -566,8 +566,8 @@ No, default behavior is the same.
566
566
567
567
Yes, disabling the feature will result in validation expressions being ignored.
568
568
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
571
571
fields will succeed.
572
572
573
573
# ##### 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.
586
586
587
587
# ##### How can a rollout or rollback fail? Can it impact already running workloads?
588
588
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
590
590
Definitions. This creates a rollout issue : Any CRDs that are defined using this new field will
591
591
be invalid according to versions of Kubernetes that pre-date the introduction of the field.
592
592
@@ -615,7 +615,7 @@ This section must be completed when targeting beta to a release.
615
615
616
616
# ##### How can an operator determine if the feature is in use by workloads?
617
617
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.
619
619
620
620
# ##### How can someone using this feature know that it is working for their instance?
621
621
@@ -709,7 +709,7 @@ For each of them, fill in the following information by copying the below templat
709
709
710
710
# ## Beta
711
711
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
713
713
supported Kubernetes versions. Also, we should make an assessment of how much support we have in
714
714
older kubernetes versions for this feature before we promote to Beta, delaying promotion as needed
715
715
to minimize negative impact to ecosystem.
0 commit comments