Skip to content

Commit e3f1e24

Browse files
Orobeeme1mrlukas-reining
authored
feat: allow setting mutating webhook failurepolicy and objectSelector via helm (#715)
Signed-off-by: Marco Orovecchia <marco@orovecchia.at> Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com> Co-authored-by: Lukas Reining <lukas.reining@codecentric.de>
1 parent 9b8e8c3 commit e3f1e24

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

chart/open-feature-operator/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ The command removes all the Kubernetes components associated with the chart and
108108
| `labels` | Labels to apply to all of the pods in the operator. | `{}` |
109109
| `annotations` | Annotations to apply to all of the pods in the operator. | `{}` |
110110

111+
### Mutating Webhook configuration
112+
113+
| Name | Description | Value |
114+
| -------------------------------- | --------------------------------------------------------- | -------- |
115+
| `mutatingWebhook.failurePolicy` | FailurePolicy when the webhook does not respond | `Ignore` |
116+
| `mutatingWebhook.objectSelector` | ObjectSelector on which pods the mutatingWebhook will run | `{}` |
117+
111118
### Sidecar configuration
112119

113120
| Name | Description | Value |

chart/open-feature-operator/values.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ labels: {}
1818
## @param annotations Annotations to apply to all of the pods in the operator.
1919
annotations: {}
2020

21+
## @section Mutating Webhook configuration
22+
mutatingWebhook:
23+
## @param mutatingWebhook.failurePolicy FailurePolicy when the webhook does not respond
24+
failurePolicy: Ignore
25+
## @param mutatingWebhook.objectSelector ObjectSelector on which pods the mutatingWebhook will run
26+
objectSelector: {}
2127
## @section Sidecar configuration
2228
sidecarConfiguration:
2329
## @param sidecarConfiguration.port Sets the value of the `XXX_PORT` environment variable for the injected sidecar.

config/overlays/helm/kustomization.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ patchesStrategicMerge:
1616
- manager.yaml
1717
- exclude-webhook-server-container-port.yaml
1818
- exclude-validatingwebhook.yaml
19+
- mutatingwebhook.yaml
1920

2021
configMapGenerator:
2122
- name: manager-config
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: admissionregistration.k8s.io/v1
2+
kind: MutatingWebhookConfiguration
3+
metadata:
4+
name: mutating-webhook-configuration
5+
webhooks:
6+
- name: mutate.openfeature.dev
7+
failurePolicy: "___{{ .Values.mutatingWebhook.failurePolicy }}___"
8+
objectSelector: "___{{ toYaml .Values.mutatingWebhook.objectSelector | nindent 4 }}___"

0 commit comments

Comments
 (0)