Admission Webhooks/Job: Add NetworkPolicy
. (#9218)
This commit is contained in:
parent
490e872b4a
commit
5b0403314c
3 changed files with 28 additions and 2 deletions
|
@ -0,0 +1,26 @@
|
||||||
|
{{- if and .Values.controller.admissionWebhooks.enabled .Values.controller.admissionWebhooks.networkPolicyEnabled }}
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: {{ include "ingress-nginx.fullname" . }}-admission
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
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:
|
||||||
|
{{- include "ingress-nginx.labels" . | nindent 6 }}
|
||||||
|
app.kubernetes.io/component: admission-webhook
|
||||||
|
policyTypes:
|
||||||
|
- Ingress
|
||||||
|
- Egress
|
||||||
|
egress:
|
||||||
|
- {}
|
||||||
|
{{- end }}
|
Loading…
Reference in a new issue