Skip to content

[FLINK-40195] helm: use static webhook certificate Secret name - #1163

Open
applike-ss wants to merge 1 commit into
apache:mainfrom
applike-ss:helm/configurable-webhook-cert-secret-name
Open

[FLINK-40195] helm: use static webhook certificate Secret name#1163
applike-ss wants to merge 1 commit into
apache:mainfrom
applike-ss:helm/configurable-webhook-cert-secret-name

Conversation

@applike-ss

@applike-ss applike-ss commented Jul 20, 2026

Copy link
Copy Markdown

Summary

Use the stable flink-operator-webhook-server-cert Secret name for the webhook certificate.

This avoids changing the Secret name during Helm upgrades and intentionally keeps the certificate name non-configurable.

Changes

  • Use flink-operator-webhook-server-cert directly in the cert-manager Certificate and controller Deployment.
  • Remove the webhook.certSecretName value and helper template.
  • Update English and Chinese documentation plus the deployment overview diagram.
  • Add Helm unit coverage for the static name in both resources.

Validation

  • Helm unittest: certificate suite 5/5 tests passed.
  • Helm unittest: deployment suite 25/25 tests passed.
  • helm lint helm/flink-kubernetes-operator --strict passed.
  • Render verification confirmed both resources keep the static name even when an obsolete webhook.certSecretName value is supplied.

@applike-ss
applike-ss marked this pull request as ready for review July 20, 2026 06:11
@applike-ss applike-ss changed the title [helm] Make webhook certificate secret name configurable [FLINK-40195] helm: make webhook certificate secret name configurable Jul 21, 2026

@Dennis-Mircea Dennis-Mircea left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@applike-ss applike-ss Jul 29, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@applike-ss
applike-ss force-pushed the helm/configurable-webhook-cert-secret-name branch from 75d438b to 39cdcd3 Compare July 29, 2026 13:17
@applike-ss applike-ss changed the title [FLINK-40195] helm: make webhook certificate secret name configurable [FLINK-40195] helm: use static webhook certificate Secret name Jul 29, 2026
@applike-ss
applike-ss force-pushed the helm/configurable-webhook-cert-secret-name branch from 39cdcd3 to a942d42 Compare July 29, 2026 13:19
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.

2 participants