Skip to content

Commit 28051c3

Browse files
Fix wordings in cronjob_webhook.go
Fix wordings in cronjob_webhook.go about validation methods for better readability.
1 parent 03e6ec5 commit 28051c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/book/src/cronjob-tutorial/testdata/project/api/v1/cronjob_webhook.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ This marker is responsible for generating a validating webhook manifest.
9292
//+kubebuilder:webhook:verbs=create;update;delete,path=/validate-batch-tutorial-kubebuilder-io-v1-cronjob,mutating=false,failurePolicy=fail,groups=batch.tutorial.kubebuilder.io,resources=cronjobs,versions=v1,name=vcronjob.kb.io,sideEffects=None,admissionReviewVersions=v1
9393

9494
/*
95-
To validate our CRD beyond what's possible with declarative validation.
96-
Generally, declarative validation should be sufficient, but sometimes more
97-
advanced use cases call for complex validation.
95+
We can validate our CRD beyond what's possible with declarative
96+
validation. Generally, declarative validation should be sufficient, but
97+
sometimes more advanced use cases call for complex validation.
9898
9999
For instance, we'll see below that we use this to validate a well-formed cron
100100
schedule without making up a long regular expression.
@@ -103,7 +103,7 @@ If `webhook.Validator` interface is implemented, a webhook will automatically be
103103
served that calls the validation.
104104
105105
The `ValidateCreate`, `ValidateUpdate` and `ValidateDelete` methods are expected
106-
to validate that its receiver upon creation, update and deletion respectively.
106+
to validate its receiver upon creation, update and deletion respectively.
107107
We separate out ValidateCreate from ValidateUpdate to allow behavior like making
108108
certain fields immutable, so that they can only be set on creation.
109109
ValidateDelete is also separated from ValidateUpdate to allow different

0 commit comments

Comments
 (0)