# argocd_source_argocd-dex-server-network-policy.yaml
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  labels:
    app.kubernetes.io/name: argocd-dex-server
    app.kubernetes.io/part-of: argocd
    app.kubernetes.io/component: dex-server
  name: argocd-dex-server-network-policy
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/name: argocd-dex-server
  policyTypes:
  - Ingress
  ingress:
    - from:
      - podSelector:
          matchLabels:
            app.kubernetes.io/name: argocd-server
      ports:
        - protocol: TCP
          port: 5556
        - protocol: TCP
          port: 5557
    - from:
        - namespaceSelector: { }
      ports:
        - port: 5558
          protocol: TCP