Skip to content

Default-deny east-west networking for observability and network namespaces #469

Description

@kelchm

Summary

20 CiliumNetworkPolicies exist and are genuinely default-deny, but zero in observability, network, flux-system, or most of kube-system. Many currently unconfined pods can reach unauthenticated in-cluster APIs: Loki runs auth_enabled: false, and the Prometheus/VMSingle/VictoriaLogs query APIs have no auth layer. Grafana is the exception — it is Kanidm-OAuth-authenticated (kubernetes/apps/observability/grafana/app/helmrelease.yaml:105) — but still lacks egress hygiene. A compromised pod can read all logs and query all metrics.

The namespace-wide default-deny pattern already exists in-tree: kubernetes/apps/ai/networkpolicy.yaml.

Proposed work

  • Apply the ai/ pattern to observability/: namespace-wide endpointSelector: {} default-deny on ingress and egress, plus per-workload allows (Alloy→both log backends, both metric stacks→scrape targets, Grafana→datasources and Kanidm, vmalert→Alertmanager).
  • Then network/ (external-dns→Cloudflare, cloudflared→edge, k8s-gateway, traefik backends).
  • kube-system/flux-system as a separate, careful follow-up phase — Cilium's own namespaces need conservative allowlists to avoid self-lockout.

Acceptance criteria

  • observability and network have base default-deny ingress+egress CNPs with explicit per-workload allows.
  • Positive tests: stack-to-stack scrape, Alloy dual-write, and Grafana datasource flows work post-rollout.
  • Negative test: a pod in an unrelated namespace cannot reach Loki/Prometheus/VMSingle APIs.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions