Skip to content

Commit

Permalink
Feature: Added MutatingWebhookConfiguration for mutating configMaps.
Browse files Browse the repository at this point in the history
  • Loading branch information
moskitone authored and bonifaido committed Jun 14, 2019
1 parent b55446c commit 5877127
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions vault-secrets-webhook/templates/apiservice-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,34 @@ items:
operator: NotIn
values:
- {{ .Release.Namespace }}
- name: configmaps.{{ template "vault-configmaps-webhook.name" . }}.admission.banzaicloud.com
clientConfig:
service:
namespace: {{ .Release.Namespace }}
name: {{ template "vault-configmaps-webhook.fullname" . }}
path: /configmaps
caBundle: {{ b64enc $ca.Cert }}
rules:
- operations:
- CREATE
- UPDATE
apiGroups:
- "*"
apiVersions:
- "*"
resources:
- configmaps
failurePolicy: Fail
namespaceSelector:
{{- if .Values.namespaceSelector.matchLabels }}
matchLabels:
{{ toYaml .Values.namespaceSelector.matchLabels | indent 6 }}
{{- end }}
matchExpressions:
{{- if .Values.namespaceSelector.matchExpressions }}
{{ toYaml .Values.namespaceSelector.matchExpressions | indent 6 }}
{{- end }}
- key: name
operator: NotIn
values:
- {{ .Release.Namespace }}

0 comments on commit 5877127

Please sign in to comment.