kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: argocd-redis-ha-proxy-network-policy
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/name: argocd-redis-ha-haproxy
  policyTypes:
  - Ingress
  ingress:
    - from:
      - podSelector:
          matchLabels:
            app.kubernetes.io/name: argocd-server
      - podSelector:
          matchLabels:
            app.kubernetes.io/name: argocd-repo-server
      - podSelector:
          matchLabels:
            app.kubernetes.io/name: argocd-application-controller
      # Redis HA server need to talk to proxy as well
      - podSelector:
          matchLabels:
            app.kubernetes.io/name: argocd-redis-ha
