From 57ca343f1a92ef0132d5083de90f3e328feab39b Mon Sep 17 00:00:00 2001 From: pieter Date: Thu, 20 Nov 2025 06:51:19 +0000 Subject: [PATCH] =?UTF-8?q?templates/networkPolicy.yaml=20=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/networkPolicy.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 templates/networkPolicy.yaml diff --git a/templates/networkPolicy.yaml b/templates/networkPolicy.yaml new file mode 100644 index 0000000..2d61ac8 --- /dev/null +++ b/templates/networkPolicy.yaml @@ -0,0 +1,22 @@ +{{- if .Values.networkPolicy.enabled }} +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ include "phpmyadmin-nginx.fullname" . }} + labels: + {{- include "phpmyadmin-nginx.labels" . | nindent 4 }} +spec: + podSelector: + matchLabels: + {{- include "phpmyadmin-nginx.selectorLabels" . | nindent 6 }} + policyTypes: + {{- toYaml .Values.networkPolicy.policyTypes | nindent 4 }} + {{- if .Values.networkPolicy.ingress }} + ingress: + {{- toYaml .Values.networkPolicy.ingress | nindent 4 }} + {{- end }} + {{- if .Values.networkPolicy.egress }} + egress: + {{- toYaml .Values.networkPolicy.egress | nindent 4 }} + {{- end }} +{{- end }} \ No newline at end of file