blob: 3a0ed7a70af4aa0a23b0dcab8e3fa6e73cd45379 [file] [log] [blame]
Giorgi Lekveishvilid1234c12023-06-19 10:37:06 +04001{{- if .Values.webhook.networkPolicy.enabled }}
gio15aa6632026-07-23 17:14:23 +04002
Giorgi Lekveishvilid1234c12023-06-19 10:37:06 +04003apiVersion: networking.k8s.io/v1
4kind: NetworkPolicy
5metadata:
gio15aa6632026-07-23 17:14:23 +04006 name: {{ template "webhook.fullname" . }}-allow-ingress
Giorgi Lekveishvilid1234c12023-06-19 10:37:06 +04007 namespace: {{ include "cert-manager.namespace" . }}
8spec:
gio15aa6632026-07-23 17:14:23 +04009 ingress:
10 {{- with .Values.webhook.networkPolicy.ingress }}
Giorgi Lekveishvilid1234c12023-06-19 10:37:06 +040011 {{- toYaml . | nindent 2 }}
12 {{- end }}
13 podSelector:
14 matchLabels:
Giorgi Lekveishvilid1234c12023-06-19 10:37:06 +040015 app.kubernetes.io/name: {{ include "webhook.name" . }}
16 app.kubernetes.io/instance: {{ .Release.Name }}
17 app.kubernetes.io/component: "webhook"
Giorgi Lekveishvilid1234c12023-06-19 10:37:06 +040018 policyTypes:
gio15aa6632026-07-23 17:14:23 +040019 - Ingress
20
Giorgi Lekveishvilid1234c12023-06-19 10:37:06 +040021{{- end }}