From 77ef9348f963fb69c3d97b562d63b09dcdc5d437 Mon Sep 17 00:00:00 2001 From: Raiko Oll Date: Tue, 17 Feb 2026 14:34:53 +0200 Subject: [PATCH] Network policy --- templates/NetworkPolicy.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 templates/NetworkPolicy.yaml diff --git a/templates/NetworkPolicy.yaml b/templates/NetworkPolicy.yaml new file mode 100644 index 0000000..3e81143 --- /dev/null +++ b/templates/NetworkPolicy.yaml @@ -0,0 +1,31 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: {{ .Release.Name }}-dragonfly-ingress-lockdown +spec: + podSelector: + matchLabels: + app: {{ .Release.Name }}-redis + + policyTypes: + - Ingress + + ingress: + - from: + - podSelector: + matchLabels: + app: {{ .Release.Name }} + ports: + - protocol: TCP + port: 6378 + + + - from: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: monitoring + ports: + - protocol: TCP + port: 5432 + # - protocol: TCP + # port: 9121