UNCLASSIFIED

egress-kube-api.yaml 544 Bytes
Newer Older
Micah Nagel's avatar
Micah Nagel committed
1 2 3 4 5 6 7
{{- if .Values.networkPolicies.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-egress-api
  namespace: {{ .Release.Namespace }}
spec:
Micah Nagel's avatar
Micah Nagel committed
8 9 10
  podSelector:
    matchLabels:
      app: istiod
Micah Nagel's avatar
Micah Nagel committed
11 12 13 14 15 16 17 18 19 20 21 22
  egress:
  - to:
    - ipBlock:
        cidr: {{ .Values.networkPolicies.controlPlaneCidr }}
        {{- if eq .Values.networkPolicies.controlPlaneCidr "0.0.0.0/0" }}
        # ONLY Block requests to cloud metadata IP
        except:
        - 169.254.169.254/32
        {{- end }}
  policyTypes:
  - Egress
{{- end }}