blob: 73771179ae6dbc03defea7564dd4463736051dba [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:
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:
gio33d62932026-07-23 16:39:35 +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:
19 - Ingress
gio15aa6632026-07-23 17:14:23 +040020---
21apiVersion: networking.k8s.io/v1
22kind: NetworkPolicy
23metadata:
24 name: {{ template "webhook.fullname" . }}-allow-egress
25 namespace: {{ include "cert-manager.namespace" . }}
26spec:
27 egress:
28 {{- with .Values.webhook.networkPolicy.egress }}
29 {{- toYaml . | nindent 2 }}
30 {{- end }}
31 podSelector:
32 matchLabels:
33 app.kubernetes.io/name: {{ include "webhook.name" . }}
34 app.kubernetes.io/instance: {{ .Release.Name }}
35 app.kubernetes.io/component: "webhook"
36 policyTypes:
37 - Egress
Giorgi Lekveishvilid1234c12023-06-19 10:37:06 +040038{{- end }}