apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
  name: jupyter-web-app
  namespace: kubeflow
spec:
  rules:
    ## allow requests from `deploykf-istio-gateway` Pods
    - from:
        - source:
            principals:
              - "cluster.local/ns/{{< .Values.deploykf_core.deploykf_istio_gateway.namespace >}}/sa/{{< .Values.deploykf_core.deploykf_istio_gateway.gatewayDeployment.serviceAccount.name >}}"
      to:
        - operation:
            ports:
              - "5000"