apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: vault-tenant-add-config-policy
  namespace: {{ .Values.namespace }}
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/name: vault
  ingress:
    - ports:
        - protocol: TCP
          port: 8200
        - protocol: TCP
          port: 8201
      from:
        - podSelector:
            matchLabels:
              job-name: vault-tenant-add-config
        - namespaceSelector:
            matchLabels:
              name: {{ .Values.namespace }}
  policyTypes:
    - Ingress