-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Adding option to disable globally applying a proxy to etc/yum.conf #6828
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. |
Welcome @wand3r3r! |
Hi @wand3r3r. 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. |
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.
/cc @oomichi
@@ -78,6 +78,7 @@ | |||
state: "{{ http_proxy | default(False) | ternary('present', 'absent') }}" | |||
no_extra_spaces: true | |||
become: true | |||
when: proxy_yum_globally | bool |
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.
How about just adding
when:
- http_proxy is defined
like the other Linux distribution cases instead of adding a new yum-specific option?
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.
That case would be taken care of by the default already in place on line 78. In my use case, I need to define http_proxy for most of the environment. But, I manage the /etc/yum.conf and /etc/yum.repos.d separately due to an internally hosted Yum Proxy service I am required to use. This variable allows me to turn off the yum proxy. So that my preconfigured repo settings still work. Without it, in my environment, Kubespray fails to download any of the preinstall packages because it is trying to reach my internal hosted yum repo using the proxy.
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.
Thanks for your explanation. I got an issue you are fixing.
I agree to add an option to skip using http_proxy for getting necessary OS packages.
One thing is I guess we will want to add other options when using different OS(like Ubuntu) because current option name is RHEL/CentOS specific.
How about more generic name like skip_http_proxy_on_os_packages
or something?
It is fine to enable this option for RHEL/CentOS only at this time if don't want to take care of the other OS distributions.
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 can do that
Thanks for updating and taking care of the other distributions! /lgtm |
/ok-to-test |
Thank you |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: floryut, wand3r3r 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 |
…ubernetes-sigs#6828) * Adding option to disable gloablly applying a proxy to etc/yum.conf * Change made to proxy_yum_globaly basedon reviewer feedback * fix trailing spaces in ymllint
What type of PR is this?
/kind bug
What this PR does / why we need it:
This change allows a user to turn of configuring the proxy setting in the
/etc/yum.conf
file. When a user has an already proxied yum repository such as Artifactory or Nexus the yum proxy should not be applied.Which issue(s) this PR fixes:
Fixes #6827
Special notes for your reviewer:
This change should leave the default behavior the same but exposes the setting should a user wish to configure it.
Does this PR introduce a user-facing change?: