[FLINK-40195] helm: use static webhook certificate Secret name - #1163
[FLINK-40195] helm: use static webhook certificate Secret name#1163applike-ss wants to merge 1 commit into
Conversation
Dennis-Mircea
left a comment
There was a problem hiding this comment.
Thanks for opening the PR! The idea of this PR is not bad, as webhook-server-cert isn't that unique name. Still, if there isn't a mandatory requirement for having the cert manager using a dedicated secret name, I'd opt in for flink-operator-webhook-server-cert name.
Either way, please make sure to update the documentation accordingly, as the webhook-server-cert is currently referenced across multiple documentation pages.
| Create the name of the webhook certificate secret. | ||
| */}} | ||
| {{- define "flink-operator.webhookCertSecretName" -}} | ||
| {{- default (printf "%s-webhook-server-cert" .Release.Name) .Values.webhook.certSecretName }} |
There was a problem hiding this comment.
The default secret name changes from webhook-server-cert to <release-name>-webhook-server-cert. On helm upgrade of an existing install, cert-manager provisions a new secret under the new name and the deployment rolls to it, so it self-heals, but the old webhook-server-cert secret is left orphaned, and anything external that referenced the old name breaks silently.
Still, I do not see a valid reason to make this certificate configurable at this extent. I'd say using flink-operator-webhook-server-cert as the certificate name is sufficient to uniquely identify it within the namespace and to avoid any collision.
There was a problem hiding this comment.
Updated and pushed the requested changes in a942d42: the webhook certificate Secret is now statically named flink-operator-webhook-server-cert, the configurability and helper were removed, all documentation and diagram references were updated, and the diagram alignment was corrected. Could you please re-review the updated changes when you have a chance?
75d438b to
39cdcd3
Compare
39cdcd3 to
a942d42
Compare
Summary
Use the stable
flink-operator-webhook-server-certSecret name for the webhook certificate.This avoids changing the Secret name during Helm upgrades and intentionally keeps the certificate name non-configurable.
Changes
flink-operator-webhook-server-certdirectly in the cert-manager Certificate and controller Deployment.webhook.certSecretNamevalue and helper template.Validation
helm lint helm/flink-kubernetes-operator --strictpassed.webhook.certSecretNamevalue is supplied.