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