-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Dualstack support for kube-proxy iptables mode #82462
Conversation
896405c
to
c8f301b
Compare
/uncc @nicksardo |
ac34b97
to
17dcc69
Compare
c3db649
to
f64d914
Compare
f64d914
to
735881c
Compare
/test pull-kubernetes-integration |
735881c
to
cab0a8f
Compare
/test pull-kubernetes-kubemark-e2e-gce-big |
23cb1fe
to
7bd40f2
Compare
7bd40f2
to
23957a6
Compare
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.
relatively minor comments from me, I think, and even these could be done in a followup unless someone disagrees strongly?
klog.V(0).Info("creating dualStackProxier for iptables.") | ||
|
||
// Create iptables handlers for both families, one is already created | ||
// Always ordered as IPv4, IPv6 |
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.
To be fair, this is copying the ipvs logic. If we want to raise the bar, we should do so for both proxiers.
Perhaps, instead of [2]utiliptables.Interface
it should be a map[core.IPFamily]utiliptables.Interface
. Remove order from the equasion, since that seems to be meaningless anyway (and assumed ordering is bound to explode on us some day).
@@ -164,6 +164,56 @@ func newProxyServer( | |||
healthzServer, | |||
config.NodePortAddresses, | |||
) | |||
|
|||
if utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) { |
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.
ipvs follows this same logic. If dual-stack is enabled, make a dual-stack proxier. We want to diminish the meaning of cluster-cidr here, so I do not think testing that should be used. TL;DR is that we have no real way to know whether dual-stack is enabled or not except to try it, and even that could change at run time. Very little cost (I think) to setting up both modes, but we do need to handle failure gracefully if dual-stack is enabled on a single-stack node.
nodePortAddresses []string, | ||
) (proxy.Provider, error) { | ||
// Create an ipv4 instance of the single-stack proxier | ||
ipv4Proxier, err := NewProxier(ipt[0], sysctl, |
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.
ipt[] is now guaranteed to be v4, v6. Are clusterCidr[] and nodeIP? It seems they are, though same comments as above - perhaps turning it into maps would be better
In other words, I will approve and hold, @vllry can decide to clear the hold or fix now. /lgtm |
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: thockin, vllry 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 |
I do prefer this idea, I think it was actually in an earlier draft of this PR. Would probably suggest this be a followup, and I'll try to handle the other suggestions before merging. |
except you forgot to actually (Assuming the hold is wanted since @vllry said she was going to address your other suggestions.) |
@vllry my comments seem to be exclusively about maps. If you want to do a follow-up, feel free to clear the hold. Thanks @danwinship for catching my flub |
Thanks everything, this was a very long time coming. Will look at the map/ordering comments as followups, as they address issues that existed prior to this PR. /hold cancel |
/retest |
/retest Review the full test history for this PR. Silence the bot with an |
/retest |
What what!!! |
Awesome work getting this merged. Thank you very much @vllry and sig-network! |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: