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

Add node-name flag to join phase #48538

Merged
merged 1 commit into from
Jul 6, 2017
Merged

Add node-name flag to join phase #48538

merged 1 commit into from
Jul 6, 2017

Conversation

GheRivero
Copy link
Contributor

@GheRivero GheRivero commented Jul 6, 2017

What this PR does / why we need it: Allow to specify a node-name instead of relaying in os.Hostname()
This is useful where kubelet use the name given by the cloud-provider to
register the node.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): partially fixes kubernetes/kubeadm#64

Special notes for your reviewer:

Release note:

Added new flag to `kubeadm join`: --node-name, that lets you specify the name of the Node object that's gonna be created

Allow to specify a node-name instead of relaying in `os.Hostname()`
This is useful where kubelet use the name given by the cloud-provider to
register the node.

Partially fix: kubernetes/kubeadm#64
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 6, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @GheRivero. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

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. I understand the commands that are listed here.

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jul 6, 2017
Copy link
Member

@luxas luxas left a comment

Choose a reason for hiding this comment

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

/lgtm

Thanks @GheRivero!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 6, 2017
@luxas luxas added this to the v1.7 milestone Jul 6, 2017
@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 6, 2017
@luxas
Copy link
Member

luxas commented Jul 6, 2017

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 6, 2017
@luxas
Copy link
Member

luxas commented Jul 6, 2017

Thank you!

@GheRivero As I guess you know, there are similar changes needed in kubeadm init codepaths as well.
Some use os.Hostname() and some node.GetHostname("") (which is a wrapper for os.Hostname(), basically)

Can you send a PR for init as well please @GheRivero 😄?

@luxas
Copy link
Member

luxas commented Jul 6, 2017

cc @caesarxuchao

This is for cherrypick, there will come one more PR related to the issue.
Fixes an AWS regression: kubernetes/kubeadm#330
Basically we must expose --node-name so that users can set it if needed. If AWS users can't set this flag, there is a chance of a deadlock.

@dmmcquay
Copy link
Contributor

dmmcquay commented Jul 6, 2017

/test pull-kubernetes-e2e-kops-aws

@dmmcquay
Copy link
Contributor

dmmcquay commented Jul 6, 2017

/lgtm

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: GheRivero, dmmcquay, luxas

Associated issue: 64

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 14cd03a into kubernetes:master Jul 6, 2017
@caesarxuchao caesarxuchao added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Jul 6, 2017
@caesarxuchao
Copy link
Member

Thanks for the explanation. Sounds reasonable to cherrypick.

@luxas
Copy link
Member

luxas commented Jul 6, 2017

Thanks! Will unblock some AWS users that now can't do their thing due to the way the AWS cloud provider is coded to work in combination with the Node Authorizer that strictly enforces law and order inside the cluster 😄

k8s-github-robot pushed a commit that referenced this pull request Jul 13, 2017
…48538-upstream-release-1.7

Automatic merge from submit-queue

Automated cherry pick of #48594 #48538

Cherry pick of #48594 #48538 on release-1.7.

#48594: Add node-name flag to `init` phase
#48538: Add node-name flag to `join` phase
@k8s-cherrypick-bot
Copy link

Commit found in the "release-1.7" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked.

1 similar comment
@k8s-cherrypick-bot
Copy link

Commit found in the "release-1.7" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked.

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. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

kubeadm should not assume that hostname == nodename
8 participants