Skip to content
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

Update Webhook Configuration objects when Reconciling #146

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

pliurh
Copy link
Collaborator

@pliurh pliurh commented Jun 15, 2021

Sync content of MutatingWebhookConfiguration and ValidatingWebhookConfiguration
CRs when needed.

https://bugzilla.redhat.com/show_bug.cgi?id=1969761

@zshi-redhat
Copy link
Collaborator

@pliurh could you explain how this PR can fix the issue of admission-controller API upgrade from v1beta to v1?

@pliurh
Copy link
Collaborator Author

pliurh commented Jun 16, 2021

@pliurh could you explain how this PR can fix the issue of admission-controller API upgrade from v1beta to v1?

The root cause is not the mismatch of the API version itself, since kube-apiserver can handle the version conversion automatically. It is because, in functions syncMutatingWebhook and syncValidatingWebhook, there is no content sync logic for the webhook config CR if it already exists. The field admissionReviewVersions in the CRs are not updated.

With this patch, all the objects follow the same sync logic. So the issue can be fixed.

@zshi-redhat
Copy link
Collaborator

/lgtm

@github-actions github-actions bot added the lgtm label Jun 17, 2021
Sync content of MutatingWebhookConfiguration and ValidatingWebhookConfiguration
CRs when needed.
@pliurh
Copy link
Collaborator Author

pliurh commented Jun 17, 2021

@jcaamano PTAL.

I don't think we need to keep the caBundle when syncing the webhook config as you proposed in #115 since it can always be reinjected by either cert-manger or the openshift-service-ca-operator.

@pliurh pliurh merged commit d09c580 into k8snetworkplumbingwg:master Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants