-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Support for defaulting of CR fields via mutating admission webhooks #1218
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
Comments
As discussed in #1217 (comment) we'll be using the upstream controller-runtime APIs for mutating admission webhooks. We just need to add the scaffolding,docs and examples. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Feature Request
Some CRs need a way to set some fields to default values.
Please add a facility to the operator-sdk to manage this situation. From a developer perspective a stub field defaulting method should be generated and the developer needs to fill it up. Requesting the generation the generation of this method should be optional for the
operator-sdk generate controller
commandIs your feature request related to a problem? Please describe.
As I said some CRs require defaulting of fields, as of now every developer of an operator has to come up with its own solution.
Describe the solution you'd like
I believe there are multiple ways to implement this, but perhaps the most kubernetes-pure would be via a MutatingAdmissionController. The generated operator could provide a http endpoint to listen for these MutatingAdmissionController webhook calls. Regardless the user experience should be the one defined above.
The text was updated successfully, but these errors were encountered: