-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Proxy: handle lower case proxy env vars #4602
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: medyagh 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 |
nice, currently i have to start minikube like this
and it's possible for minikube to read REGISTRY-MIRROR (MINIKUBE-REGISTRY-MIRROR) env ? and also print it to stdout like HTTP_PROXY ? |
@@ -447,6 +447,9 @@ func generateConfig(cmd *cobra.Command, k8sVersion string) (cfg.Config, error) { | |||
if !cmd.Flags().Changed("docker-env") { | |||
for _, k := range proxy.EnvVars { | |||
if v := os.Getenv(k); v != "" { | |||
// convert https_proxy to HTTPS_PROXY for linux | |||
// TODO (@medyagh): if user has both http_proxy & HTTPS_PROXY set merge them. |
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.
no idea on merge, you mean just take one's precedence over the other one ?
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.
ah ! thanks for correcting me, I meant that for no_proxy and NO_PROXY, if there are both merge them into one bigger NO_PROXY. good catch !
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.
ok, and also, would you mind me to REGISTRY_MIRROR env to EnvVars in the same file (proxy.go) ?
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 tried to use viper to load MINIKUBE_REGISTRY_MIRROR env
see PR #4607
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 am not familiar with REGISTRY_MIRROR env var. the purpose of this PR is to plumb the standard networking env vars. (the ones that operating systems use to change their proxies). does REGISTRY_MIRROR env var change the behaviour of OS ? or is it minikube specific en var ?
if it is minikube specific that would be for a different PR
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.
on a second thought, is that env var a standard docker env var that everyone uses to set their registery mirror ?
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.
we also have another in progress PR by by @tstromberg https://github.com/kubernetes/minikube/pull/3835/files
I think we can address the registry mirror in a separate PR
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.
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 difficult would it be to add an integration test for this?
@dfang That would be a great feature for another PR, would you mind creating issue so someone work on it? |
not difficult at all ! :) |
i'm working on it , trying to help and learn more about minikube . |
Closes #4600 and #3242 (hopefully)