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

configure Docker daemon to use proxy #322

Merged
merged 1 commit into from
Feb 23, 2019
Merged

configure Docker daemon to use proxy #322

merged 1 commit into from
Feb 23, 2019

Conversation

bart0sh
Copy link
Contributor

@bart0sh bart0sh commented Feb 20, 2019

This is a second fix for the proxy issues (see #306 for details)

Docker fails to pull images if running behind the proxy.
It causes weave-net pods to stuck in ImagePullBackOff state.

Configured proxy as explained in docker documentation:
https://docs.docker.com/config/daemon/systemd/#http-proxy
This should solve the issue.

Fixes: #306

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 20, 2019
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 20, 2019
Docker fails to pull images if running behind the proxy.
It causes weave-net pods to stuck in ImagePullBackOff state.

Configured proxy as explained in docker documentation:
https://docs.docker.com/config/daemon/systemd/#http-proxy
This should solve the issue.

Fixes: #306

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
@bart0sh
Copy link
Contributor Author

bart0sh commented Feb 20, 2019

/cc @BenTheElder

@bart0sh
Copy link
Contributor Author

bart0sh commented Feb 20, 2019

/test pull-kind-conformance-parallel

@bart0sh
Copy link
Contributor Author

bart0sh commented Feb 20, 2019

@BenTheElder looks like failing test is not related to my changes. It's rather related to kubeadm changes. What should I do with this?

Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

thanks @bart0sh
mostly SGTM

@@ -146,6 +146,12 @@ func (cc *Context) ProvisionNodes() (nodeList map[string]*nodes.Node, err error)
return nodeList, err
}

cc.Status.Start(fmt.Sprintf("[%s] Configuring proxy 🐋", configNode.Name))
Copy link
Member

@neolit123 neolit123 Feb 20, 2019

Choose a reason for hiding this comment

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

had to view this RAW and search the U+... in google as none of my Windows fonts support this glyph.
i think we need a different icon for the proxy and not a "whale".

also my suggestion to move these to constants was not accepted. :grumble:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It worked just fine fine for me in Mac Terminal. As for another icon, so far the code configures proxy for Docker, so I decided to use "whale" glyph.

Can you suggest where can I see a list of supported glyphs?

Copy link
Member

Choose a reason for hiding this comment

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

i guess the whale also makes sense. i'm going to leave this topic to @BenTheElder

Copy link
Member

@BenTheElder BenTheElder Feb 23, 2019

Choose a reason for hiding this comment

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

This is fine for now and on par with the rest. I'll probably revisit this UX late next week. Output needs cleanup.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if we need a status for this step given how quick it should be, but like I said we need to look at cleaning this up anyhow.

Aside: what windows are you using Lubomir? Windows should have emoji fonts and even has some custom nonstandard emoji.


// WriteFile writes temporary file on the host
// and copies it to the node
func (n *Node) WriteFile(dest, content string) error {
Copy link
Member

Choose a reason for hiding this comment

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

didn't we have a method for this already?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no as far as I can see. I'm planning to use this to refactor a couple of places in a separate PR.

@neolit123
Copy link
Member

neolit123 commented Feb 20, 2019

/priority important-longterm
/kind feature

@BenTheElder looks like failing test is not related to my changes. It's rather related to kubeadm changes. What should I do with this?

yes, nothing for now.

@k8s-ci-robot k8s-ci-robot added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. kind/feature Categorizes issue or PR as related to a new feature. labels Feb 20, 2019
@bart0sh
Copy link
Contributor Author

bart0sh commented Feb 20, 2019

/test pull-kind-conformance-parallel

@BenTheElder
Copy link
Member

/assign
coming back to this in the morning, I expected to come back after the kubaadm fix upstream, but today was mostly tackling prow.k8s.io problems... 😞

Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
Thank you!

}

// copy the temp file from the host to the node
if err := n.CopyTo(path, dest); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

I have a neat trick to avoid this tempfile but we can do it in a follow up:
node.Command("cp", "/dev/stdin", dest).SetInput(strings.NewReader(contents)).Run()
Will probably refactor to do this in other places to deal with docker installed via snap not having access to $TMPDIR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks nice :)

@@ -146,6 +146,12 @@ func (cc *Context) ProvisionNodes() (nodeList map[string]*nodes.Node, err error)
return nodeList, err
}

cc.Status.Start(fmt.Sprintf("[%s] Configuring proxy 🐋", configNode.Name))
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if we need a status for this step given how quick it should be, but like I said we need to look at cleaning this up anyhow.

Aside: what windows are you using Lubomir? Windows should have emoji fonts and even has some custom nonstandard emoji.

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bart0sh, BenTheElder

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 Feb 23, 2019
cc.Status.Start(fmt.Sprintf("[%s] Configuring proxy 🐋", configNode.Name))
if err := node.SetProxy(); err != nil {
// TODO: logging here
return nodeList, errors.Wrapf(err, "failed to set proxy for %s", configNode.Name)
Copy link
Member

Choose a reason for hiding this comment

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

Also slightly iffy on this being a creation failure rather than a warning, but we can revisit this.

@k8s-ci-robot k8s-ci-robot merged commit d31173b into kubernetes-sigs:master Feb 23, 2019
stg-0 pushed a commit to stg-0/kind that referenced this pull request Sep 27, 2023
* Add iam permissions

* Add iam permissions

* Add iam permissions

* Fix Files checks

* Fix eks-custom-links fix

* Fix eks-custom-links fix

* Fix eks-custom-links fix

* Fix eks-custom-links fix

* Fix eks-custom-links fix

* Fix eks-custom-links fix

* Fix [Docs Checks] Empty lines

* Fix [Docs Checks] Empty lines

* Fix [Docs Checks] Empty lines

* Fix [Docs Checks] Empty lines

* Fix [Docs Checks] Empty lines

* Fix [Docs Checks] Empty lines

* Fix [Docs Checks] Empty lines

* Fix [Docs Checks] Empty lines
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kind create cluster fails to create cluster on default install
4 participants