-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
kube-proxy: make --init-only a no-op on Windows #121529
Conversation
This will allow the same installation manifest to be used on Windows and Linux
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: uablrek The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @neolit123 @danwinship @jsturtevant I can't test this myself |
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.
/lgtm
this makes sense to me, but it needs a sanity check.
yes, please see this comment about supporting an OS-portable manifest.
LGTM label has been added. Git tree hash: c302e7da4d845d0a9002e61981954c14596f7bda
|
thanks for sending this PR! |
@@ -81,7 +82,8 @@ func (s *ProxyServer) platformCheckSupported() (ipv4Supported, ipv6Supported, du | |||
// createProxier creates the proxy.Provider | |||
func (s *ProxyServer) createProxier(config *proxyconfigapi.KubeProxyConfiguration, dualStackMode, initOnly bool) (proxy.Provider, error) { | |||
if initOnly { | |||
return nil, fmt.Errorf("--init-only is not implemented on Windows") | |||
klog.Info("--init-only is not implemented on Windows") | |||
return nil, nil |
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.
what happens in the code path if a nil proxier without an error is returned?
shouldn't this be handled with an additional check somewhere so that there are no panics?
EDIT: maybe a unit test is needed too.
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.
I got a contradicting comment from @thockin #120864 (comment). @neolit123 please coordinate with him and I do whatever you think is best
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.
I don't mind the exact implementation details. IMO, what makes sense for Windows and the multi-os portability:
- the flag is passed, kube-proxy shows a message and exits with status 0. status 1 is more accurate, but this is done to not trip the init container setup.
- the flag is not passed, kube-proxy runs in priv mode as it does today.
EDIT: also note that:
kube-proxy: make --init-only a no-op on Windows
technically, it's not a NO-OP if status 0 is returned.
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.
mentioned this ^ in #sig-windows on the k8s slack:
https://kubernetes.slack.com/archives/C0SJ4AFB7/p1698317022006619
@uablrek: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
But it doesn't allow that, does it? You'd need: Linux:
Windows:
So if we see |
This will allow the same installation manifest to be used on Windows and Linux
/kind bug
/area kube-proxy
/sig network
/sig windows
/area kubeadm
What this PR does / why we need it:
Kubeadm
makes no difference between Windows/Linux when installingkube-proxy
. The--init-only
flag should therefore be a no-op on Windows, rather than an error.Which issue(s) this PR fixes:
It doesn't fix, but it helps kubernetes/kubeadm#2948
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: