Operator now generates validatingwebhookconfiguration for Helm deployment #656
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.
Helm
The operator now generates validatingwebhookconfiguration in the operator code itself (in cmd/main.go). Also detects orchestrator type in main.go. validatingwebhookconfiguration removed from Helm charts.
internal/webhook/apps/v1alpha1/configuration.gocontains this generation.New environment variables introduced: TLS_MODE, TLS_CA, TLS_SECRET, OPERATOR_NAMESPACE, OPERATOR_NAME_PREFIX.
Additionally implemented webhook signing configuration in a similar manner to DRA driver:
This change introduces a new Helm chart value to supply a CA bundle (e.g., from ca.crt) directly into the ValidatingWebhookConfiguration when cert-manager is not used. Secret must be created with tls.key and tls.crt.
This allows clusters without automated CA injection to configure the webhook manually and ensure proper TLS verification.
Note: in deployment.yaml, this is how TLS_CA is expected to be provided in values with an indent. Should that be removed or kept for aesthetic reasons:
OLM
Validatingwebhookconfiguration (called webhookdefinitions in OLM) removed from CSV and moved to the operator code (same as above). The non-Helm specific changes (changes not in
deploymentsare common to OLM as well (including new ENV variables).To work around this:
service.beta.openshift.io/inject-cabundle": "true"bundle/manifests/k8s-nim-operator.webhookservice.yamlwith an OpenShift Service annotation:service.beta.openshift.io/serving-cert-secret-name: k8s-nim-operator-webhook-server-cert