22{{- $tlsCrt := .Values.tlsCertificate.tlsCertificate -}}
33{{- $tlsKey := .Values.tlsCertificate.tlsKey -}}
44{{- if .Values.tlsCertificate.create -}}
5- {{- $altNames := list ( printf "%s.%s" (include "wiz-admission-controller.fullname " .) .Release.Namespace ) ( printf "%s.%s.svc" (include "wiz-admission-controller.fullname " .) .Release.Namespace ) ( printf "%s.%s" ( include "wiz-kubernetes-audit-log-collector.name" .) .Release.Namespace ) ( printf "%s.%s.svc" ( include "wiz-kubernetes-audit-log-collector.name" .) .Release.Namespace ) -}}
5+ {{- $altNames := list ( printf "%s.%s" (include "wiz-admission-controller-enforcer.name " .) .Release.Namespace ) ( printf "%s.%s.svc" (include "wiz-admission-controller-enforcer.name " .) .Release.Namespace ) ( printf "%s.%s" ( include "wiz-kubernetes-audit-log-collector.name" .) .Release.Namespace ) ( printf "%s.%s.svc" ( include "wiz-kubernetes-audit-log-collector.name" .) .Release.Namespace ) -}}
66{{- $ca := genCA "wiz-admission-controller-ca" 3650 -}}
77{{- $cert := genSignedCert ( include "wiz-admission-controller.fullname" . ) nil $altNames 3650 $ca -}}
88{{- $tlsCrt = $cert.Cert | b64enc -}}
1212apiVersion : admissionregistration.k8s.io/v1
1313kind : ValidatingWebhookConfiguration
1414metadata :
15- name : {{ printf "%s-%s" (include "wiz-admission-controller.fullname " . ) "misconfigurations" }}
15+ name : {{ printf "%s-%s" (include "wiz-admission-controller-enforcer.name " . ) "misconfigurations" }}
1616 namespace : {{ .Release.Namespace | quote }}
1717 labels :
1818 {{- include "wiz-admission-controller.labels" . | nindent 4 }}
@@ -28,7 +28,7 @@ webhooks:
2828 clientConfig :
2929 service :
3030 namespace : {{ .Release.Namespace }}
31- name : {{ include "wiz-admission-controller.fullname " . }}
31+ name : {{ include "wiz-admission-controller-enforcer.name " . }}
3232 path : /opa-validator
3333 port : {{ .Values.service.port }}
3434{{- if not $useCertManagerCerts }}
@@ -67,7 +67,7 @@ webhooks:
6767 clientConfig :
6868 service :
6969 namespace : {{ .Release.Namespace }}
70- name : {{ include "wiz-admission-controller.fullname " . }}
70+ name : {{ include "wiz-admission-controller-enforcer.name " . }}
7171 path : /image-integrity-validator
7272 port : {{ .Values.service.port }}
7373{{- if not $useCertManagerCerts }}
@@ -90,7 +90,7 @@ webhooks:
9090apiVersion : admissionregistration.k8s.io/v1
9191kind : ValidatingWebhookConfiguration
9292metadata :
93- name : {{ printf "%s-%s" (include "wiz-admission-controller.fullname " . ) "kubernetes-audit-logs" }}
93+ name : {{ printf "%s-%s" (include "wiz-admission-controller-enforcer.name " . ) "kubernetes-audit-logs" }}
9494 namespace : {{ .Release.Namespace | quote }}
9595 labels :
9696 {{- include "wiz-admission-controller.labels" . | nindent 4 }}
@@ -145,7 +145,7 @@ webhooks:
145145 clientConfig :
146146 service :
147147 namespace : {{ .Release.Namespace }}
148- name : {{ include "wiz-admission-controller.fullname " . }}
148+ name : {{ include "wiz-admission-controller-enforcer.name " . }}
149149 path : /dumper
150150 port : {{ .Values.service.port }}
151151{{- if not $useCertManagerCerts }}
0 commit comments