apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata: {name: argocd-explicit-egress, namespace: argocd}
spec:
  podSelector: {}
  policyTypes: [Egress]
  egress:
    - to:
        - podSelector: {}
    - to:
        - namespaceSelector: {matchLabels: {kubernetes.io/metadata.name: kube-system}}
          podSelector: {matchLabels: {k8s-app: kube-dns}}
      ports: [{protocol: UDP, port: 53}, {protocol: TCP, port: 53}]
    - to:
        - ipBlock: {cidr: REPLACE_API_SERVER_CIDR}
        - ipBlock: {cidr: REPLACE_GIT_CIDR}
        - ipBlock: {cidr: REPLACE_OIDC_CIDR}
      ports: [{protocol: TCP, port: 443}]
