kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: payment
  namespace: sock-shop
spec:
  podSelector:
    matchLabels:
      name: payment
  policyTypes:
    - Ingress
  ingress:
  - from:
      - podSelector:
          matchLabels:
            name: front-end
      - podSelector:
          matchLabels:
            name: orders
    ports:
      - protocol: TCP
        port: 80
