apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: aprs-allow-metrics
  namespace: aprs
spec:
  podSelector:
    matchLabels:
      app: aprs
  policyTypes:
    - Ingress
  ingress:
    # Allow metrics scraping from Prometheus (via kube-apiserver pod proxy)
    # and from the monitoring namespace
    - from:
        - namespaceSelector: {}
      ports:
        - port: 4000
          protocol: TCP
