blob: 410c15deb1e7364963e02c026935739e6b4c0072 [file] [log] [blame]
gioc895c1d2026-07-23 17:18:25 +04001{{- if .Values.networkPolicy.enabled }}
2---
3apiVersion: networking.k8s.io/v1
4kind: NetworkPolicy
5metadata:
6 name: {{ template "cert-manager.fullname" . }}-allow-ingress
7 namespace: {{ include "cert-manager.namespace" . }}
8spec:
9 ingress:
10 {{- with .Values.networkPolicy.ingress }}
11 {{- toYaml . | nindent 2 }}
12 {{- end }}
13 podSelector:
14 matchLabels:
15 app.kubernetes.io/name: {{ include "cert-manager.name" . }}
16 app.kubernetes.io/instance: {{ .Release.Name }}
17 app.kubernetes.io/component: "controller"
18 policyTypes:
19 - Ingress
20---
21apiVersion: networking.k8s.io/v1
22kind: NetworkPolicy
23metadata:
24 name: {{ template "cert-manager.fullname" . }}-allow-egress
25 namespace: {{ include "cert-manager.namespace" . }}
26spec:
27 egress:
28 {{- with .Values.networkPolicy.egress }}
29 {{- toYaml . | nindent 2 }}
30 {{- end }}
31 podSelector:
32 matchLabels:
33 app.kubernetes.io/name: {{ include "cert-manager.name" . }}
34 app.kubernetes.io/instance: {{ .Release.Name }}
35 app.kubernetes.io/component: "controller"
36 policyTypes:
37 - Egress
38{{- end }}