apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: notification-api-np
  labels:
    app: notification
spec:
  podSelector:
    matchLabels:
      component: notification-api
  policyTypes:
    - Ingress
  ingress:
    - from:
        - podSelector:
            matchLabels:
              component: notification-ui
      ports:
        - protocol: TCP
          port: 3000
