kubeadm: pod-cidr, service-cidr should not go through any proxy#58698
kubeadm: pod-cidr, service-cidr should not go through any proxy#58698dixudx wants to merge 1 commit into
Conversation
jamiehannaford
left a comment
There was a problem hiding this comment.
thanks for fixing this, just one minor nit
There was a problem hiding this comment.
you could also continue if name == no_proxy and set the env in 1 place rather than 2. WDYT? not a big issue IMO
|
First of all, kubeadm produce warnings if connections to any used CIDRs will end-up via proxy. As for PR itself, it handles only IPv4 addresses, that is not acceptable, as since 1.9.x release kubernetes can be both IPv4 and IPv6. /assign kad |
There was a problem hiding this comment.
kubeadm must be able to handle both IPv4 and IPv6.
There was a problem hiding this comment.
@kad Thanks for reminding. This function works both for IPv4 and IPv6. Locally tested.
|
The release note is not very clear at all. This is about bypassing proxies for intra-cluster communication, right? If so, please say something like that, so that it makes sense to end-users. To be honest it took me a while to get what it is about exactly. Also, as far as I am aware, the communication of all control plane components should not even leave the network, accept for fetching images from a public registry, or check version (like kubeadm and weave net do), so I am not entirely sure why we have it set everywhere in the first place... |
|
@errordeveloper It is related to issues #36573 kubernetes/kubeadm#5 |
08dff30 to
3725088
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dixudx Assign the PR to them by writing Associated issue: #37494 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:You can indicate your approval by writing |
|
@kad @jamiehannaford Updated. PTAL. Thanks. |
@kad Related to issue kubernetes/kubeadm#666 as well. |
|
/retest |
3725088 to
e28be4c
Compare
|
/retest |
There was a problem hiding this comment.
This could be a really long list if you have a large CIDR block. Isn't there a limit on how long an environment variable can be (less than 32k)?
There was a problem hiding this comment.
There is limit. And transport connections supports CIDR notation of subnets in no_proxy.
There is no need to expand them at all.
There was a problem hiding this comment.
@kad AFAIK, golang does not support no_proxy with CIDR notation of subnet.
Here is an on-going issue golang/go#16704 on this.
Isn't there a limit on how long an environment variable can be (less than 32k)
There is limit.
Yeah. https://www.in-ulm.de/~mascheck/various/argmax/ lists Actual values for ARG_MAX. This is a risk when setting environments.
There was a problem hiding this comment.
That is exactly the reason why I consider that patch is incorrect:
- kubeadm and other kubernetes components are utilizing modified http transport which supports CIDR notations.
- kubeadm gives warnings during init stage if access to any IP address in pod or service CIDRs will be going via proxies, according to values of *_proxy variables.
- If system admin require traffic to be going via proxies, he is able to ignore warning.
- if system admin wants to have traffic going directly = values of environment variables before running kubeadm should be including pod and service cidrs.
- with current idea of the patch behaviour becomes inconsistent: kubeadm will produce warning, but anyway will alter variables put into manifests. That is less predictable for sysadmins and will cause more issues.
- trying to expand IPv6 pod/service cidrs will lead to OOM-kill of kubeadm.
So, to summarise: if in issue kubernetes/kubeadm#666 warning was correctly shown to user of kubeadm but was ignored by user, we don't need this PR at all. If for some reason warning was not shown, we need to investigate more.
There was a problem hiding this comment.
@kad Thanks for the explanation.
And transport connections supports CIDR notation of subnets in no_proxy.
There is no need to expand them at all.
I did found the link
kubernetes/staging/src/k8s.io/apimachinery/pkg/util/net/http.go
Lines 86 to 88 in f31ac9e
Will update it.
e28be4c to
4075fc0
Compare
|
ping @jamiehannaford @roberthbailey @kad Updated. PTAL. Thanks. |
|
/retest |
|
I think that it is better to have consistent behavior, and this PR is not needed. Unless we get more information from kubernetes/kubeadm#666, I'd prefer to handle proxy settings as it was agreed in #35044: we have pre-flight checks and they are providing warnings to sysadmins. Sysadmins have choice which way is better for their particular setup. |
|
I agree with @kad's view on this.
…On Fri, 26 Jan 2018, 11:50 am Alexander D. Kanevskiy, < ***@***.***> wrote:
I think that it is better to have consistent behavior, and this PR is not
needed. Unless we get more information from kubernetes/kubeadm#666
<kubernetes/kubeadm#666>, I'd prefer to handle
proxy settings as it was agreed in #35044
<#35044>: we have pre-flight
checks and they are providing warnings to sysadmins. Sysadmins have choice
which way is better for their particular setup.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58698 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPWSziZn5zOGx7z8Lme1Gc5k2U6Si9qks5tObwIgaJpZM4Rp0Ua>
.
|
Right. But most people would just ignore those warnings. |
|
We can make them as errors in theory. With fine-grained error skipping, that can be an option for those who has legitimate cases to use transport calls via proxies. Not a nice solution, but at least predictable and explicit. |
|
@dixudx PR needs rebase |
|
Let's close this PR. If we consider that proxy checks must become errors, it can be done in separate PR. /close |
|
Thanks, @kad, I agree with your judgement on this tricky issue.
|
What this PR does / why we need it:
kubeadm passes proxy variables to static pods during init stage by #37494. But all the pods and service ips in pod-cidr, service-cidr should not go through any proxy.
This PR fixes this issue.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes kubernetes/kubeadm#666
Special notes for your reviewer:
/assign @luxas
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/area kubeadm
Release note: