Skip to content

Commit f076573

Browse files
author
John Doe
committed
feat: By default fail to create a Pod if it's clone configuration is invalid
1 parent e6d0be7 commit f076573

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

helm/git-clone-operator/templates/mutatingwebhookconfiguration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ metadata:
1313
{{- include "git-clone-operator.labels" . | nindent 8 }}
1414
webhooks:
1515
- name: {{ include "git-clone-operator.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
16-
failurePolicy: Ignore # do not block whole cluster
16+
failurePolicy: {{ .Value.webhook.failurePolicy }}
1717
{{- if .Values.onlyLabelledNamespaces }}
1818
namespaceSelector:
1919
matchLabels:

helm/git-clone-operator/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ podSecurityContext:
1919
fsGroup: 65161
2020
runAsNonRoot: true
2121

22+
webhook:
23+
failurePolicy: Fail
24+
2225
serviceAccount:
2326
create: true
2427
name: git-clone-operator-sa

0 commit comments

Comments
 (0)