apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-ns-dev-to-app-frontend
  namespace: testnamespace
spec:
  policyTypes:
    - Ingress
  podSelector:
    matchLabels:
      app: "frontend"
  ingress:
    - from:
        - namespaceSelector:
            matchLabels:
              namespace: "dev"
            matchExpressions:
              - key: namespace
                operator: NotIn
                values:
                  - test0
                  - test1
