From 8f7c15e93fea7f7d4a7f70d73ff28097e5496d86 Mon Sep 17 00:00:00 2001 From: AndreiS Date: Tue, 17 Feb 2026 12:43:20 +0000 Subject: [PATCH] Update policy.yaml --- policy.yaml | 50 ++++++++++++++++++++++---------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/policy.yaml b/policy.yaml index c2c929c..d009b45 100644 --- a/policy.yaml +++ b/policy.yaml @@ -1,35 +1,29 @@ apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: - name: test-network-policy - namespace: memelord-andrei + name: {{ .Release.Name }}-dragonfly-ingress-lockdown spec: podSelector: matchLabels: - role: db - policyTypes: - - Ingress - - Egress - ingress: - - from: - - ipBlock: - cidr: 172.17.0.0/16 - except: - - 172.17.1.0/24 - - namespaceSelector: - matchLabels: - project: myproject - - podSelector: - matchLabels: - role: frontend - ports: - - protocol: TCP - port: 6379 - egress: - - to: - - ipBlock: - cidr: 10.0.0.0/24 - ports: - - protocol: TCP - port: 5978 + app: {{ .Release.Name }}-redis + policyTypes: + - Ingress + + ingress: + - from: + - podSelector: + matchLabels: + app: {{ .Release.Name }} + ports: + - protocol: TCP + port: 6379 + + + - from: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: monitoring + ports: + - protocol: TCP + port: 5432 \ No newline at end of file