Skip to content

Commit

Permalink
feat: allow setting mutating webhook failurepolicy and objectSelector…
Browse files Browse the repository at this point in the history
… via helm (#715)

Signed-off-by: Marco Orovecchia <[email protected]>
Co-authored-by: Michael Beemer <[email protected]>
Co-authored-by: Lukas Reining <[email protected]>
  • Loading branch information
3 people authored Jan 13, 2025
1 parent 9b8e8c3 commit e3f1e24
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions chart/open-feature-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ The command removes all the Kubernetes components associated with the chart and
| `labels` | Labels to apply to all of the pods in the operator. | `{}` |
| `annotations` | Annotations to apply to all of the pods in the operator. | `{}` |

### Mutating Webhook configuration

| Name | Description | Value |
| -------------------------------- | --------------------------------------------------------- | -------- |
| `mutatingWebhook.failurePolicy` | FailurePolicy when the webhook does not respond | `Ignore` |
| `mutatingWebhook.objectSelector` | ObjectSelector on which pods the mutatingWebhook will run | `{}` |

### Sidecar configuration

| Name | Description | Value |
Expand Down
6 changes: 6 additions & 0 deletions chart/open-feature-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions config/overlays/helm/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ patchesStrategicMerge:
- manager.yaml
- exclude-webhook-server-container-port.yaml
- exclude-validatingwebhook.yaml
- mutatingwebhook.yaml

configMapGenerator:
- name: manager-config
Expand Down
8 changes: 8 additions & 0 deletions config/overlays/helm/mutatingwebhook.yaml
Original file line number Diff line number Diff line change
@@ -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 }}___"

0 comments on commit e3f1e24

Please sign in to comment.