---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: istiod
  namespace: istio-system
spec:
  podSelector:
    matchLabels:
      app: istiod
  policyTypes:
    - Ingress
  ingress:
    # - from:
    #     - namespaceSelector:
    #         matchLabels:
    #           kubernetes.io/metadata.name: kube-system
    #       podSelector:
    #         matchLabels:
    #           tier: control-plane
    #   ports:
    #     - port: 15017
    #       protocol: TCP
    - from:
        - ipBlock:
            cidr: 0.0.0.0/0
      ports:
        - port: 15017
          protocol: TCP
    - from:
        - namespaceSelector:
            matchLabels:
              kubernetes.io/metadata.name: istio-ingress
          podSelector:
            matchLabels:
              app: istio-ingressgateway
      ports:
        - port: 15012
          protocol: TCP
