Skip to content

Commit 8fbf1ae

Browse files
committed
Add configurable failurePolicy for injector's webhook
Fixes hashicorp#399
1 parent 5242cfe commit 8fbf1ae

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

templates/injector-mutating-webhook.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@ webhooks:
2424
namespaceSelector:
2525
{{ toYaml .Values.injector.namespaceSelector | indent 6}}
2626
{{ end }}
27+
{{- with .Values.injector.failurePolicy }}
28+
failurePolicy: {{.}}
29+
{{ end }}
2730
{{ end }}

values.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ injector:
7070
# sidecar-injector: enabled
7171
namespaceSelector: {}
7272

73+
# Configures failurePolicy of the webhook. By default webhook failures are ignored.
74+
# To block pod creation while webhook is unavailable, set the policy to `Fail` below.
75+
# See https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#failure-policy
76+
#
77+
# failurePolcy: Fail
78+
7379
certs:
7480
# secretName is the name of the secret that has the TLS certificate and
7581
# private key to serve the injector webhook. If this is null, then the

0 commit comments

Comments
 (0)