Skip to content
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

docs: Document proxy environment variable usage. #733

Merged
merged 2 commits into from
Oct 26, 2021
Merged

docs: Document proxy environment variable usage. #733

merged 2 commits into from
Oct 26, 2021

Conversation

zhengtianbao
Copy link
Member

When in enterprise network, Krew may need a proxy setting to access public network fetch plugins. Krew DefaultClient set DefaultTransport which set ProxyFromEnvironment when it's nil, thus Krew will pick these HTTP_PROXY, HTTPS_PROXY environment vars up by default, I guess we can update the document for more details.

Related issue: #685

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 25, 2021
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 25, 2021
Copy link
Member

@ahmetb ahmetb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the contribution. some suggestions.

@@ -43,4 +43,15 @@ variable in your `~/.bashrc`, `~/.bash_profile`, or `~/.zshrc`:
export KREW_DEFAULT_INDEX_URI='git@github.com:foo/custom-index.git'
```

## Configure network proxy {#custom-network-proxy}

If you want to use Krew with a http proxy, you may need to configure environment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a → an
http → HTTP

## Configure network proxy {#custom-network-proxy}

If you want to use Krew with a http proxy, you may need to configure environment
variables to support http_proxy, https_proxy, or no_proxy:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change

,you may need to configure environment variables to support http_proxy, https_proxy, or no_proxy

to

, you can configure environment variables HTTP_PROXY, HTTPS_PROXY, and NO_PROXY.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also add:

Behavior of these environment variables are explained here.

Comment on lines 52 to 53
export HTTP_PROXY="http://proxy-ip:port/"
export HTTPS_PROXY="http://proxy-ip:port/"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think http:// prefix is required for these values (although it might still work)

```shell
export HTTP_PROXY="http://proxy-ip:port/"
export HTTPS_PROXY="http://proxy-ip:port/"
export NO_PROXY="ip,ip,ip,ip,.example.com"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a better example can be:

export NO_PROXY="ip1,ip2:port2,.example.com"

@zhengtianbao
Copy link
Member Author

Thank you for sharing your advice with me.

@ahmetb
Copy link
Member

ahmetb commented Oct 26, 2021

image

looks good
/lgtm
/approve
Thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 26, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmetb, zhengtianbao

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 26, 2021
@k8s-ci-robot k8s-ci-robot merged commit 1649da8 into kubernetes-sigs:master Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants