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

kubeadm: override node registration options from command line #71270

Conversation

bart0sh
Copy link
Contributor

@bart0sh bart0sh commented Nov 20, 2018

What type of PR is this?

/kind bug

What this PR does / why we need it:

'kubeadm join' silently ignores --node-name and --cri-socket
command line options if --config option is specified.

In some cases it's much easier for users to override these parameters
from the command line instead of updating config, especially for
multi-node automatic deployments where only node name should be changed.

Implemented setting 'name' and 'criSocket' options from the command
line even if --config command line option is used.

Special notes for your reviewer:

You can see more details in [this comment](url
kubernetes/kubeadm#857 (comment))

Does this PR introduce a user-facing change?:

kubeadm join correctly uses --node-name and --cri-socket when --config option is also used

'kubeadm join' silently ignores --node-name and --cri-socket
command line options if --config option is specified.

In some cases it's much easier for users to override these parameters
from the command line instead of updating config, especially for
multi-node automatic deployments where only node name should be changed.

Implemented setting 'name' and 'criSocket' options from the command
line even if --config command line option is used.
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Nov 20, 2018
@k8s-ci-robot k8s-ci-robot added area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 20, 2018
@bart0sh
Copy link
Contributor Author

bart0sh commented Nov 20, 2018

/cc @neolit123 @seh

@k8s-ci-robot
Copy link
Contributor

@bart0sh: GitHub didn't allow me to request PR reviews from the following users: seh.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @neolit123 @seh

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.

@neolit123
Copy link
Member

/retest

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

@timothysc timothysc self-assigned this Nov 20, 2018
@timothysc timothysc added the priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. label Nov 20, 2018
@k8s-ci-robot k8s-ci-robot removed the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Nov 20, 2018
@timothysc timothysc added this to the v1.13 milestone Nov 20, 2018
Copy link
Member

@timothysc timothysc 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

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

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Nov 20, 2018
@nikopen
Copy link
Contributor

nikopen commented Nov 20, 2018

/lgtm

@bart0sh
Copy link
Contributor Author

bart0sh commented Nov 20, 2018

/retest

@bart0sh
Copy link
Contributor Author

bart0sh commented Nov 20, 2018

/test pull-kubernetes-integration

@k8s-ci-robot k8s-ci-robot merged commit 27d8290 into kubernetes:master Nov 20, 2018
@seh
Copy link
Contributor

seh commented Nov 21, 2018

@bart0sh, by my reading of kubeadm/app/util/config.ConfigFileAndDefaultsToInternalConfig, as used by kubeadm init, it only takes the --node-name flag into account when the --config flag isn't used, as was the case you fixed here with kubeadm join. Should we fix kubeadm init similarly?

With your fix, I no longer need to patch my JoinConfiguration file on each worker node, but I do still need to patch my InitConfiguration file on the masters.

@neolit123
Copy link
Member

we should probably add that too @bart0sh what you think?
let me know if you don't have the time and i can send a PR this week.

@bart0sh
Copy link
Contributor Author

bart0sh commented Nov 21, 2018

@seh, @neolit123 I'll try to fix it. Thanks for pointing this out!

@neolit123
Copy link
Member

@bart0sh thank you! ping me on slack if you have any questions.

@bart0sh
Copy link
Contributor Author

bart0sh commented Nov 21, 2018

sorry for not fixing it in 'kubeadm init'. I somehow assumed from this post that it's 'kubeadm join' issue.

@seh
Copy link
Contributor

seh commented Nov 21, 2018

That's my fault for complaining profusely about the problem in front of my face, but not complaining enough about the next problem I'd run into once the first problem was solved.

@neolit123
Copy link
Member

@bart0sh
no problem.
BTW we need the PR for today, because the new beta is tomorrow. LMK if i should take it.

@bart0sh
Copy link
Contributor Author

bart0sh commented Nov 21, 2018

@neolit123 yep, working on it.

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. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants