kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: shipping
  namespace: sock-shop-too
spec:
  podSelector:
    matchLabels:
      layer: shipping
  policyTypes:
    - Ingress
  ingress:
  - from:
      - podSelector:
          matchLabels:
            layer: service
      - podSelector:
          matchLabels:
            layer: shipping
    ports:
      - protocol: TCP
        port: 80
      - protocol: TCP
        port: 5672
