Skip to content

Commit 85aec58

Browse files
maorhalevi-sooded-s1
authored andcommitted
charts: added lease resource exclusion from validating webhook
1 parent 2577dd9 commit 85aec58

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

charts/s1-agent/templates/hooks/webhookconfiguration.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,7 @@ webhooks:
8787
rules:
8888
{{- toYaml .Values.admissionControllers.validating.rules | nindent 4 }}
8989
{{- toYaml .Values.admissionControllers.validating.selector | nindent 2 }}
90+
matchConditions:
91+
{{- toYaml .Values.admissionControllers.validating.matchConditions | nindent 4 }}
9092
{{- end }}
9193
{{ end }}

charts/s1-agent/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ admissionControllers:
113113
resources:
114114
- '*'
115115
scope: '*'
116+
matchConditions:
117+
- name: 'exclude-leases'
118+
expression: '!(request.resource.group == "coordination.k8s.io" && request.resource.resource == "leases")' # Match non-lease resources.
116119

117120
helper:
118121
fullnameOverride: ""

0 commit comments

Comments
 (0)