helm: honour webhook.enabled=false at runtime (ENABLE_WEBHOOKS) and add extraEnv - #179
Merged
Merged
Conversation
…traEnv With webhook.enabled: false the chart stops rendering the webhook port, the certificate volume and the cert-manager resources, but the manager still registers its admission webhooks (cmd/main.go gates them on the ENABLE_WEBHOOKS environment variable, which the chart never set), starts the webhook server, looks for /tmp/k8s-webhook-server/serving-certs/tls.crt and exits. The chart now sets ENABLE_WEBHOOKS=false whenever webhooks are disabled, so the operator runs without a serving certificate on clusters without cert-manager. extraEnv is a passthrough for further environment variables. The default render is unchanged.
abachir
marked this pull request as ready for review
September 14, 2026 22:07
karimra
approved these changes
Sep 14, 2026
Collaborator
|
Thanks for the contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With
webhook.enabled: falsethe chart stops rendering the webhook port, the certificate volume and the cert-managerCertificate/Issuer/WebhookConfiguration, but the manager still registers its admission webhooks:cmd/main.gogates them on theENABLE_WEBHOOKSenvironment variable, which the chart never sets. The manager then starts the webhook server, looks for/tmp/k8s-webhook-server/serving-certs/tls.crt, finds no volume and exits:Observed with chart 0.4.0 on an EKS cluster without cert-manager, where webhooks were disabled for that reason; the same wiring is on
main.Change
templates/deployment.yaml: whenwebhook.enabledis false, setENABLE_WEBHOOKS=falseon the manager container.values.yaml/templates/deployment.yaml:extraEnvpassthrough for further environment variables.helm lintclean. Withwebhook.enabled=falsethe render carries the variable; the default render is byte-identical tomain.Opened as a draft for your view on the approach; happy to adjust (for example a dedicated
webhook.enabled→ flag if you prefer a CLI flag over the environment variable).