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
  ingress:
    - from:
      - podSelector:
          matchLabels:
            app.kubernetes.io/name: argocd-redis-ha-haproxy
      # Redis HA server pods need to talk to each other
      - podSelector:
          matchLabels:
            app.kubernetes.io/name: argocd-redis-ha

