| Giorgi Lekveishvili | d1234c1 | 2023-06-19 10:37:06 +0400 | [diff] [blame] | 1 | {{- if .Values.webhook.networkPolicy.enabled }} |
| 2 | |
| 3 | apiVersion: networking.k8s.io/v1 |
| 4 | kind: NetworkPolicy |
| 5 | metadata: |
| 6 | name: {{ template "webhook.fullname" . }}-allow-ingress |
| 7 | namespace: {{ include "cert-manager.namespace" . }} |
| 8 | spec: |
| 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 }} |