-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRD defaulting and validation should not be placed in the controller #152
Comments
IMO, to keep the operator deployment simple, adding the admission webhook should be optional for setting default value and validation. Without admission webhook, control can still can set the default value and validation. If the resource fails the validation, the controller will stop the reconcile until the user modifies it to the correct value. |
I agree that the admission webhook is optional, but doing validation in the controller has a significant drawback: users won't receive immediate feedback when they submit incorrect fields. They would have to investigate the controller logs to troubleshoot the issue, which can be inconvenient and time-consuming. |
@airycanon Sorry for not getting back to you sooner. You're right, and we can take the admission webhook as an enhancement. We can keep track of it. I created the new issue #153. If you are interested in the feature, feel free to contribute to it. |
CRD defaulting and validation should not be placed in the controller, but rather in the admission webhook.
Benefits:
The text was updated successfully, but these errors were encountered: