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