kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: argocd-redis-ha-server-network-policy
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/name: argocd-redis-ha
  policyTypes:
  - Ingress
  - Egress
  ingress:
  - from:
    - podSelector:
        matchLabels:
          app.kubernetes.io/name: argocd-redis-ha-haproxy
    - podSelector:
        matchLabels:
          app.kubernetes.io/name: argocd-redis-ha
    ports:
    - port: 6379
      protocol: TCP
    - port: 26379
      protocol: TCP
  egress:
  - to:
    - podSelector:
        matchLabels:
          app.kubernetes.io/name: argocd-redis-ha
    ports:
    - port: 6379
      protocol: TCP
    - port: 26379
      protocol: TCP
  - ports:
    - port: 53
      protocol: UDP
    - port: 53
      protocol: TCP
