2023-11-29 21:39:51 +00:00
{{- if and .Values.controller.admissionWebhooks.enabled .Values.controller.admissionWebhooks.patch.enabled .Values.controller.admissionWebhooks.patch.networkPolicy.enabled (not .Values.controller.admissionWebhooks.certManager.enabled) -}}
2023-01-08 21:59:28 +00:00
apiVersion : networking.k8s.io/v1
kind : NetworkPolicy
metadata :
2023-10-29 17:26:05 +00:00
name : {{ include "ingress-nginx.admissionWebhooks.fullname" . }}
2023-10-24 17:53:46 +00:00
namespace : {{ include "ingress-nginx.namespace" . }}
2023-01-08 21:59:28 +00:00
annotations :
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
labels :
{{- include "ingress-nginx.labels" . | nindent 4 }}
app.kubernetes.io/component : admission-webhook
{{- with .Values.controller.admissionWebhooks.patch.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec :
podSelector :
matchLabels :
2023-09-24 15:02:57 +00:00
{{- include "ingress-nginx.selectorLabels" . | nindent 6 }}
2023-01-08 21:59:28 +00:00
app.kubernetes.io/component : admission-webhook
policyTypes :
2023-09-24 15:02:57 +00:00
- Ingress
- Egress
2023-01-08 21:59:28 +00:00
egress :
2023-09-24 15:02:57 +00:00
- {}
2023-01-08 21:59:28 +00:00
{{- end }}