-
Notifications
You must be signed in to change notification settings - Fork 478
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
Fix network policy in local setup in conjunction with HA VPN. #8370
Fix network policy in local setup in conjunction with HA VPN. #8370
Conversation
Previously, the network policy specifying the allowed traffic to the machine pods in the local setup only listed other machine pods and `vpn-seed-server` as allowed ingress sources. However, in the HA VPN case `kube-apiserver` connects to machines as well. The connection to kubelet was allowed, but everything else was blocked by policy. This meant that `kubectl proxy` would not allow proxying traffic to pods in the host network due to network policy. This change adapts the network policy to work in both VPN cases and use the more general `to-shoot-networks` labels, which were already used correctly.
Issues reaching github.com in tests: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 🎉 I could confirm that it works in my local setup!
/lgtm
LGTM label has been added. Git tree hash: 87ca83273624d56dc2c0f22863f72126fea1a92a
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: acumino The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
1 similar comment
/retest |
Test cluster should be fixed now. |
…er#8370) Previously, the network policy specifying the allowed traffic to the machine pods in the local setup only listed other machine pods and `vpn-seed-server` as allowed ingress sources. However, in the HA VPN case `kube-apiserver` connects to machines as well. The connection to kubelet was allowed, but everything else was blocked by policy. This meant that `kubectl proxy` would not allow proxying traffic to pods in the host network due to network policy. This change adapts the network policy to work in both VPN cases and use the more general `to-shoot-networks` labels, which were already used correctly.
…er#8370) Previously, the network policy specifying the allowed traffic to the machine pods in the local setup only listed other machine pods and `vpn-seed-server` as allowed ingress sources. However, in the HA VPN case `kube-apiserver` connects to machines as well. The connection to kubelet was allowed, but everything else was blocked by policy. This meant that `kubectl proxy` would not allow proxying traffic to pods in the host network due to network policy. This change adapts the network policy to work in both VPN cases and use the more general `to-shoot-networks` labels, which were already used correctly.
How to categorize this PR?
/area networking
/area dev-productivity
/kind bug
What this PR does / why we need it:
Fix network policy in local setup in conjunction with HA VPN.
Previously, the network policy specifying the allowed traffic to the machine pods in the local setup only listed other machine pods and
vpn-seed-server
as allowed ingress sources. However, in the HA VPN casekube-apiserver
connects to machines as well. The connection to kubelet was allowed, but everything else was blocked by policy. This meant thatkubectl proxy
would not allow proxying traffic to pods in the host network due to network policy. This change adapts the network policy to work in both VPN cases and use the more generalto-shoot-networks
labels, which were already used correctly.Which issue(s) this PR fixes:
None.
Special notes for your reviewer:
Release note:
/cc @istvanballok @MartinWeindel