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