apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: <%= role %>
  labels:
    app: <%= app %> # IE: backend
  namespace: <%= app %> # IE: backend
spec:
  podSelector:
    matchLabels:
      app: <%= app %> # IE: backend
      role: <%= role %>
  ingress:
  - from:
    - namespaceSelector:
        matchLabels:
          app: <%= app %> # IE: frontend
    - podSelector:
        matchLabels:
          app: <%= app %> # IE: backend
