diff --git a/chart/open-feature-operator/values.yaml b/chart/open-feature-operator/values.yaml index 9a4034966..411ed7d04 100644 --- a/chart/open-feature-operator/values.yaml +++ b/chart/open-feature-operator/values.yaml @@ -18,6 +18,12 @@ labels: {} ## @param annotations Annotations to apply to all of the pods in the operator. annotations: {} +## @section Mutating Webhook configuration +mutatingWebhook: + ## @param mutatingWebhook.failurePolicy FailurePolicy when the webhook does not respond + failurePolicy: Ignore + ## @param mutatingWebhook.objectSelector ObjectSelector on which pods the mutatingWebhook will run + objectSelector: {} ## @section Sidecar configuration sidecarConfiguration: ## @param sidecarConfiguration.port Sets the value of the `XXX_PORT` environment variable for the injected sidecar. diff --git a/config/overlays/helm/kustomization.yaml b/config/overlays/helm/kustomization.yaml index 809ecf305..8c6c16dd9 100644 --- a/config/overlays/helm/kustomization.yaml +++ b/config/overlays/helm/kustomization.yaml @@ -16,6 +16,7 @@ patchesStrategicMerge: - manager.yaml - exclude-webhook-server-container-port.yaml - exclude-validatingwebhook.yaml + - mutatingwebhook.yaml configMapGenerator: - name: manager-config diff --git a/config/overlays/helm/mutatingwebhook.yaml b/config/overlays/helm/mutatingwebhook.yaml new file mode 100644 index 000000000..0486f64a9 --- /dev/null +++ b/config/overlays/helm/mutatingwebhook.yaml @@ -0,0 +1,8 @@ +apiVersion: admissionregistration.k8s.io/v1 +kind: MutatingWebhookConfiguration +metadata: + name: mutating-webhook-configuration +webhooks: + - name: mutate.openfeature.dev + failurePolicy: "___{{ .Values.mutatingWebhook.failurePolicy }}___" + objectSelector: "___{{ toYaml .Values.mutatingWebhook.objectSelector | nindent 4 }}___"