blob: 37f90bd2ef724b38f626c87642acc96e14995067 [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:
Giorgi Lekveishvilid1234c12023-06-19 10:37:06 +040014 app.kubernetes.io/name: {{ include "webhook.name" . }}
15 app.kubernetes.io/instance: {{ .Release.Name }}
16 app.kubernetes.io/component: "webhook"
Giorgi Lekveishvilid1234c12023-06-19 10:37:06 +040017 policyTypes:
18 - Egress
19{{- end }}