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

Allow webhook CA bundle to be taken from secret #273

Merged
merged 5 commits into from
Oct 22, 2022

Conversation

spilchen
Copy link
Collaborator

@spilchen spilchen commented Oct 21, 2022

Previously, if you are providing your own certs for the webhook, the CA bundle had to be specified as a helm chart parameter. This made it harder to deploy the operator if the cert was generated through a helm chart too because you won't know what the cert is when you deploy your app.

This change is to allow the CA cert to be read from the webhook.tlsSecret. If that secret has the key ca.crt, then it will be patched in the webhook config by the operator.

The secret that contains the tlsSecret has to be provided to the operator now. An empty string implies the operator will generate the certificate internally.

Support for deploying without the webhook had to be fixed as it was broken in the prior change that relaxed the cert-manager dependency.

The default name of the tls secret when using cert-manager was updated to reflect the name chosen when installing with olm.

Some e2e cleanup was added. The custom-cert-webhook had some logging testing that was moved to its own test. Then I created a copy of custom-cert-webhook for when the CA bundle is in the secret.

I'm also removing the 'wait for webhook' logic when we deploy the operator. This should not be needed anymore due to a previous operator-sdk update. But we did see some tests failing (see #30). I am removing that wait logic again so that we can debug any webhook issues that may arise in the e2e tests. I had to add this back in and update the disable-webhook test. I got an e2e failure because of this. This gave me some important context, which I hope to use for a proper fix for #30, but I'll leave that for a separate PR.

Matt Spilchen added 4 commits October 20, 2022 14:39
Previously, if you are providing your own certs for the webhook, the CA
bundle had to be specified as a helm chart parameter. This made it
harder to deploy the operator if the cert was generated through a helm
chart too because you won't know what the cert is when you deploy your
app.

This change is to allow the CA cert to be read from the
webhook.tlsSecret. If that secret has the key ca.crt, then it will be
patched in the webhook config by the operator.

The secret that contains the tlsSecret has to provided to the operator
now. An empty string implies the operator will generate the certificate
internally.

Support for deploying without the webhook had to fixed as it was broken
in the prior change that relaxed the cert-manager dependency.

The default name of the tls secret when using cert-manager was updated
to reflect the name chosen when installing with olm.

Some e2e cleanup was added. The custom-cert-webhook had some logging
testing that was moved to its own test. Then I created a copy of
custom-cert-webhook for when the CA bundle is in the secret.
@spilchen spilchen self-assigned this Oct 21, 2022
@spilchen spilchen merged commit 3f069e8 into vertica:main Oct 22, 2022
@spilchen spilchen deleted the ca-bundle-runtime branch October 22, 2022 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant