Skip to content

Commit

Permalink
Merge pull request #90 from acobaugh/webhooknamespaceselector
Browse files Browse the repository at this point in the history
fix(helm): fix the namespaceSelector that prevents the webhook from running in the release namespace
  • Loading branch information
k8s-ci-robot authored Oct 13, 2022
2 parents 1b39a40 + 924a03e commit 9f8c15f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions charts/gmsa/templates/mutatingwebhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ webhooks:
# don't run on ${NAMESPACE}
namespaceSelector:
matchExpressions:
- key: {{ .Release.Namespace }}
- key: kubernetes.io/metadata.name
operator: NotIn
values: [disabled]
values: [{{ .Release.Namespace }}]
- key: windows.k8s.io/disabled
operator: NotIn
values: ["true"]

7 changes: 5 additions & 2 deletions charts/gmsa/templates/validatingwebhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ webhooks:
# don't run on ${NAMESPACE}
namespaceSelector:
matchExpressions:
- key: {{ .Release.Namespace }}
- key: kubernetes.io/metadata.name
operator: NotIn
values: [disabled]
values: [{{ .Release.Namespace }}]
- key: windows.k8s.io/disabled
operator: NotIn
values: ["true"]

0 comments on commit 9f8c15f

Please sign in to comment.