apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: web-dashboard
  namespace: foxhunt
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/name: web-dashboard
  policyTypes:
    - Ingress
    - Egress
  ingress:
    - from:
        - podSelector:
            matchLabels:
              app.kubernetes.io/name: tailscale-gitlab-proxy
      ports:
        - protocol: TCP
          port: 80
  egress:
    # Init container fetches assets from MinIO
    - to:
        - podSelector:
            matchLabels:
              app.kubernetes.io/name: minio
      ports:
        - protocol: TCP
          port: 9000
