Repository navigation
api | web | docs: isolate teams on the network with admin exceptions - #29
Merged
Merged
Conversation
Every team namespace gets a NetworkPolicy that only accepts traffic from its own namespace and from namespaces that are not teams (unbind-system, kube-system). System admins add exceptions under System > Settings > Network: a service in another team, or any source, may reach a service. Node port services stay reachable from outside. The API applies the policies at startup, on every change and every minute. Isolation is on for new installs and off for existing ones until an admin turns it on. Team roles no longer include networkpolicies. fixes UNB-384
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
Unbind created no NetworkPolicies, so every pod could connect to every service in every team namespace. Team boundaries existed in RBAC and the UI but not on the network.
What changed
unbind-team-isolation. It accepts ingress from its own namespace and from namespaces without theunbind.app/team-namespacelabel (unbind-system, kube-system and similar). Egress is not limited.network_exceptionsand cascade when a service is deleted.NetworkPolicyManagerin the API applies everything at startup, after team create, after every settings change, and every minute. The minute sync follows node port changes and puts back policies edited by hand.networkpolicies, so a team editor can't delete their own isolation.operations/network-isolation. The MCP instructions mention isolation.No chart, CRD or operator changes. The API's service account can already manage NetworkPolicies and patch namespaces.
Banano
I mapped cross-team traffic on unbind-banano over MCP, read only. These exceptions are needed before turning isolation on:
Cilium's docs say CIDR rules don't match cluster nodes, so the node callbacks need the any-source exception. This isn't tested on Cilium yet.
Testing
fixes UNB-384