-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Ensure kubeadm doesn't use proxy #7275
Conversation
Hi @champtar. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
4fdc8b5
to
6c895d4
Compare
6c895d4
to
a03b34f
Compare
/ok-to-test |
Shouldn't playbooks configure proper no_proxy on environment which would be inherited by kubeadm? For installation maybe that is ok to ignore proxy settings but for later use things like local kubectl shouldn't probably use proxy too. |
Problem is there are many ways to configure proxy on a system, this could be an option to put the computed values in /etc/environment, but for sure kubeadm should not have proxy set as it leads to issues. I can add this |
|
Actually I thought more about situation after deployment, in environment with http proxy there will be environment variables exported for example with /etc/environment. If no_proxy variable will not be extended with k8s addresses then kubectl may try connect through proxy which probably will not be desired behavior. Even for installation, if playbook would set no_proxy variable in /etc/environment with values which are already calculated then that could be inherited by commands executed later. |
Proxies are a mess :( |
There is no reasons to use set_facts here Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
*_proxy variables might be present in the environment (/etc/environment, bash profile, ...) When this is the case we end up with those proxy configuration in /etc/kubernetes/manifests/kube-*.yaml manifests We cannot unset env variables, but kubeadm is nice enough to ignore empty vars https://github.com/kubernetes/kubernetes/blob/93d288e2a47fa6d497b50d37c8b3a04e91da4228/cmd/kubeadm/app/util/env.go#L27 Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
a03b34f
to
b57312a
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.
Nice work.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: champtar, floryut 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 |
* Move proxy_env to kubespray-defaults/defaults There is no reasons to use set_facts here Signed-off-by: Etienne Champetier <e.champetier@ateme.com> * Ensure kubeadm doesn't use proxy *_proxy variables might be present in the environment (/etc/environment, bash profile, ...) When this is the case we end up with those proxy configuration in /etc/kubernetes/manifests/kube-*.yaml manifests We cannot unset env variables, but kubeadm is nice enough to ignore empty vars https://github.com/kubernetes/kubernetes/blob/93d288e2a47fa6d497b50d37c8b3a04e91da4228/cmd/kubeadm/app/util/env.go#L27 Signed-off-by: Etienne Champetier <e.champetier@ateme.com> (cherry picked from commit 1c5391d)
* Move proxy_env to kubespray-defaults/defaults There is no reasons to use set_facts here Signed-off-by: Etienne Champetier <e.champetier@ateme.com> * Ensure kubeadm doesn't use proxy *_proxy variables might be present in the environment (/etc/environment, bash profile, ...) When this is the case we end up with those proxy configuration in /etc/kubernetes/manifests/kube-*.yaml manifests We cannot unset env variables, but kubeadm is nice enough to ignore empty vars https://github.com/kubernetes/kubernetes/blob/93d288e2a47fa6d497b50d37c8b3a04e91da4228/cmd/kubeadm/app/util/env.go#L27 Signed-off-by: Etienne Champetier <e.champetier@ateme.com> (cherry picked from commit 1c5391d)
* Move proxy_env to kubespray-defaults/defaults There is no reasons to use set_facts here Signed-off-by: Etienne Champetier <e.champetier@ateme.com> * Ensure kubeadm doesn't use proxy *_proxy variables might be present in the environment (/etc/environment, bash profile, ...) When this is the case we end up with those proxy configuration in /etc/kubernetes/manifests/kube-*.yaml manifests We cannot unset env variables, but kubeadm is nice enough to ignore empty vars https://github.com/kubernetes/kubernetes/blob/93d288e2a47fa6d497b50d37c8b3a04e91da4228/cmd/kubeadm/app/util/env.go#L27 Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
*_proxy
variables might be present in the environment (/etc/environment, bash profile, ...)When this is the case we end up with those proxy configuration in /etc/kubernetes/manifests/kube-*.yaml manifests
We cannot unset env variables, but kubeadm is nice enough to ignore empty vars
https://github.com/kubernetes/kubernetes/blob/93d288e2a47fa6d497b50d37c8b3a04e91da4228/cmd/kubeadm/app/util/env.go#L27
What type of PR is this?
/kind bug
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #6250
Special notes for your reviewer:
Does this PR introduce a user-facing change?: