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: allow usage --config with --print-join-command #69624

Conversation

bart0sh
Copy link
Contributor

@bart0sh bart0sh commented Oct 10, 2018

What this PR does / why we need it:

kubeadm token create --print-join-command --config
fails with Error: can not mix '--config' with arguments [print-join-command]

As print-joint command can't be put into the configuration file it
should be possible to use those 2 options at the same time.

Added print-join-command options to the list of exceptions in
ValidateMixedArguments check to allow its usage with --config option.

Which issue(s) this PR fixes:

Fixes kubernetes/kubeadm#1166

Release note:

NONE

kubeadm token create  --print-join-command --config <path>
fails with Error: can not mix '--config' with arguments [print-join-command]

As print-joint command can't be put into the configuration file it
should be possible to use those 2 options at the same time.

Added print-join-command options to the list of exceptions in
ValidateMixedArguments check to allow its usage with --config option.

Fixes: kubernetes/kubeadm#1166
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. 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 Oct 10, 2018
@bart0sh
Copy link
Contributor Author

bart0sh commented Oct 10, 2018

/retest

@neolit123
Copy link
Member

/hold
having a discussion in the linked issue.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 10, 2018
@neolit123
Copy link
Member

/kind bug
/hold cancel
/lgtm

both --config and --print-join-command should be allowed, which can be observed in this function:
https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/cmd/token.go#L211

/assign @fabriziopandini

@k8s-ci-robot k8s-ci-robot added 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. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Oct 10, 2018
@neolit123
Copy link
Member

something else to note here:
https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/cmd/token.go#L212-L213

this doesn't seem to work.
ideally we would want to have a toggle where the config just defaults to some version and this version is not fetched from the internet.

@fabriziopandini
Copy link
Member

@bart0sh Thanks for this PR!
/lgtm
/approve

@neolit123

both --config and --print-join-command should be allowed

If I got it right this is what this PR is achieving

something else to note here:

I'm not sure I got your point but it seems to me unrelated to this issue/PR

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 11, 2018
@neolit123
Copy link
Member

@fabriziopandini

If I got it right this is what this PR is achieving

yes

I'm not sure I got your point but it seems to me unrelated to this issue/PR

there is another PR that sort of achieves that:

#69645

@k8s-ci-robot k8s-ci-robot merged commit 709ac9c into kubernetes:master Oct 11, 2018
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. release-note-none Denotes a PR that doesn't merit a release note. 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.

kubeadm token create mix: --print-join-command and --config
4 participants