-
Notifications
You must be signed in to change notification settings - Fork 811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable network policy by default #1271
Conversation
Do we know of things that could trip up users? I don't have a good overview what would need to happen if you upgrade an existing cluster or what new things could go wrong during setup. If anyone can remember some adding them to the docs will save us time on support later. |
Thinking out loud:
|
Two test failures relating to a reference to I think it relates to us not using the minikube-netpol.yaml configurations additions any more, where the following section was available:
|
The current policy allows all egress for all pods apart from singleuser→ hub:
networkPolicy:
enabled: false
egress:
- to:
- ipBlock:
cidr: 0.0.0.0/0
proxy:
networkPolicy:
enabled: false
egress:
- to:
- ipBlock:
cidr: 0.0.0.0/0
singleuser:
networkPolicy:
enabled: false
egress:
# Required egress is handled by other rules so it's safe to modify this
- to:
- ipBlock:
cidr: 0.0.0.0/0
except:
- 169.254.169.254/32 The only thing that might not is if someone is running an additional network server, or wants to connect directly to one of the pods from some other non-jupyter service. E.g. jupyterhub/kubespawner#299 |
I'm conflicted about making these opt-out instead of opt-in.
I think it is okay to enable them by default anyhow, but I'd like to have the breaking change documentation made along with the PR so it doesn't becomes additional required work before the next release. Since this PR was openedI've updated the network policies since this PR was opened in #1670. I made general use of port 53 allowed which is questionable as it can be used for anything. If we want to target it better, we need to make some assumptions about the k8s cluster though, for example that the kubernetes DNS server is in the namespace of kube-system and it has a label called My take on the action points for this PR
|
expand network policy documentation, noting that they are on by default and how to grant ingress via label selectors and limit access via egress rules
717eafe
to
e982c45
Compare
I wanted to help a novice reader better understand this breaking change so I reduced some assumptions about prerequisite knowledge by adding some detail and explanations.
Thanks for your updates @minrk, sorry for the slow turnaround. I'm pushing towards 0.10.0-beta.1 now and want this part of that, so I pushed two commits related to documentation in the changelog, and an inline comment in values.yaml that I found to be saying too little. If this build succeeds, I'll go ahead and merge. |
rather than making these opt-in, let's make them opt-out