blob: 09712009d66e1bf3c645ca65a529d5e656a613b7 [file] [log] [blame]
Giorgi Lekveishvilid1234c12023-06-19 10:37:06 +04001{{- if .Values.webhook.networkPolicy.enabled }}
2apiVersion: networking.k8s.io/v1
3kind: NetworkPolicy
4metadata:
5 name: {{ template "webhook.fullname" . }}-allow-egress
6 namespace: {{ include "cert-manager.namespace" . }}
7spec:
8 egress:
9 {{- with .Values.webhook.networkPolicy.egress }}
10 {{- toYaml . | nindent 2 }}
11 {{- end }}
12 podSelector:
13 matchLabels:
14 app: {{ include "webhook.name" . }}
15 app.kubernetes.io/name: {{ include "webhook.name" . }}
16 app.kubernetes.io/instance: {{ .Release.Name }}
17 app.kubernetes.io/component: "webhook"
18 {{- with .Values.webhook.podLabels }}
19 {{- toYaml . | nindent 6 }}
20 {{- end }}
21 policyTypes:
22 - Egress
23{{- end }}