[
  {
    "apiVersion": "networking.k8s.io/v1",
    "kind": "NetworkPolicy",
    "metadata": {
      "name": "default-deny",
      "namespace": "payments"
    },
    "spec": {
      "podSelector": {},
      "policyTypes": [
        "Ingress",
        "Egress"
      ],
      "ingress": [],
      "egress": []
    }
  },
  {
    "apiVersion": "networking.k8s.io/v1",
    "kind": "NetworkPolicy",
    "metadata": {
      "name": "front-to-api",
      "namespace": "payments"
    },
    "spec": {
      "podSelector": {
        "matchLabels": {
          "app": "api"
        }
      },
      "policyTypes": [
        "Ingress"
      ],
      "ingress": [
        {
          "from": [
            {
              "namespaceSelector": {
                "matchLabels": {
                  "zone": "edge"
                }
              },
              "podSelector": {
                "matchLabels": {
                  "app": "web"
                }
              }
            }
          ],
          "ports": [
            {
              "port": 8443
            }
          ]
        }
      ]
    }
  }
]
