Repository navigation
refactor(kubernetes): remove NetworkPolicies - #150
Conversation
The kubernetes provider no longer writes NetworkPolicies or ClusterNetworkPolicies: netpol.go and its fence in Provision, the dynamic client it used, the host-wide default deny (config/kubernetes-provider/cluster-network-policy.yaml) and the RBAC for both are gone. A real pod's traffic is whatever each cluster's network allows. The cluster table loses `cidrs` and `host`. It is parsed strictly, so a table that still sets them fails to load with an "unknown field" error naming the line to delete, rather than loading as if the fence were still there. The webhook rules that existed only for isolation are removed too: opted-in Pods with hostNetwork are admitted again, and a placed Pod may drop the opt-in label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
efacd8c to
e160a73
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved issues allow host-network Pods to run with incorrect networking and opted-out Pods to leak resources, while legacy isolation policies need documented cleanup to avoid blocking namespaces.
3 open issues
Review effort: Balanced
Both were removed with namespace isolation as if they existed only for it. They do not: - A host-network Pod runs as written on no provider: Modal, RunPod and AWS drop the field, and the kubernetes provider's copy would put the real pod on its target node's own network. The validator already refuses what providers drop silently. - Teardown keys on the opt-in label. reapTerminalPod skips a Pod without it, and the readiness timeout only fails the Pod, relying on that reap, so a placed Pod that dropped the label and timed out kept its NodeClaim and its instance, still billing. The rules are restored as on main, with these reasons instead of isolation's. docs/multi-cluster.md also gains how to delete the policies isolation wrote, which removing the code leaves behind: a leftover host-wide deny would cut off the targets for namespaces Nebula places into from now on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Removing namespace isolation changes the tenant security boundary, requiring operator validation of cross-namespace reachability, any replacement policies, and existing-policy cleanup before rollout.
No open issues 🎉
3 resolved since last review
Review effort: Balanced
There is nothing to migrate from: drop the cleanup section and the troubleshooting row for a table still setting cidrs or host, and the test that pinned that error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/lgtm |
InftyAI-Agent
left a comment
There was a problem hiding this comment.
Approved: PR has both lgtm and approved labels


Removes namespace isolation from the kubernetes provider: Nebula no longer writes NetworkPolicies or ClusterNetworkPolicies.
Change
netpol.go, its fence inProvision, the dynamic client it used, the host-wide default deny (config/kubernetes-provider/cluster-network-policy.yaml), and the RBAC for both inremote-rbac.yaml.cidrsandhost, and the sampleclusters.yamldropshost: true.hostNetwork: trueis refused: no provider runs it as written (Modal, RunPod and AWS drop the field, and the kubernetes provider's copy would put the real pod on its target node's network).reapTerminalPodskips unlabeled Pods), so a placed Pod that dropped it and timed out would keep its NodeClaim and instance.docs/multi-cluster.mdnow says Nebula writes no NetworkPolicies, so a real pod's traffic is whatever each cluster's network allows. It also replaces a Hiverge-looking sample cluster name.Testing
main, since its logic is unchanged; only their comments now give the new reasons.make testandmake lintpass, andconfig/kubernetes-providerandconfig/defaultstill render with kustomize.🤖 Generated with Claude Code