Staging a Reusable `workload-egress` Component Before Namespace Rollout
This push packages namespace-wide egress isolation as a reusable Kustomize component instead of hand-writing policies per application. The point is to make the default-deny posture and the opt-in DNS grant reviewable in one place, so admitting a namespace to the rollout becomes a composition step rather than a fresh policy design.
How the workload-egress component composes
I documented the overlay contract in docs/runtime-isolation.md. An admitted namespace sets its real namespace in the application Kustomization and composes ../../components/workload-egress, which instates namespace-wide egress isolation. Cluster DNS is opt-in through a Pod template label, and the shared grant selects CoreDNS in kube-system on both UDP and TCP 53. Everything else stays in the application overlay, with the application’s own Pod labels as the source selector and exact destination labels, protocol, and port. openwiki/architecture/cluster-topology.md now points at that contract so the topology notes and the operating doc agree.
What the peer test actually verifies
The additions to scripts/ci/network-policy-peers-test.py are test code, not a runtime result. The test copies the component into a temporary directory, renders a fixture application with kubectl kustomize, and asserts the rendered set is exactly the default-deny and DNS-allow policies. It also checks each is a NetworkPolicy scoped to Egress with no ingress rules and that the deny policy’s selector is empty. That pins the component’s rendered shape; it does not prove live traffic behavior in the cluster.
Why additive grants matter to platform teams
Kubernetes combines NetworkPolicy grants additively, so one broad rule elsewhere can silently undo the restriction the component installs. The doc therefore asks for an audit of every existing policy selecting those Pods, including mesh and API access paths. Any platform team rolling out default-deny egress should adopt the same sequence: ship the shared component, require per-application declarations for remaining destinations, and audit for overlapping grants before declaring a namespace isolated.