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] Print required flags when running kubeadm upgrade plan #65802

Merged
merged 2 commits into from
Jul 7, 2018

Conversation

xlgao-zju
Copy link
Contributor

@xlgao-zju xlgao-zju commented Jul 4, 2018

What this PR does / why we need it:
print required flags when running kubeadm upgrade plan

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Close kubernetes/kubeadm#935

Special notes for your reviewer:
/assign @chuckha
/assign @neolit123

Release note:

kubeadm: print required flags when running kubeadm upgrade plan

Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jul 4, 2018
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 4, 2018
@k8s-ci-robot k8s-ci-robot added area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. labels Jul 4, 2018
@xlgao-zju xlgao-zju changed the title print required flags when running kubeadm upgrade plan [kubeadm] Print required flags when running kubeadm upgrade plan Jul 4, 2018
@neolit123
Copy link
Member

thank you @xlgao-zju
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 4, 2018
@neolit123
Copy link
Member

/kind bug
@kubernetes/sig-cluster-lifecycle-pr-reviews

potential cherry-pick?

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 4, 2018
@neolit123
Copy link
Member

@chuckha @xlgao-zju
i think we should handle --allow-release-candidate-upgrades as well?

@xlgao-zju
Copy link
Contributor Author

i think we should handle --allow-release-candidate-upgrades as well?

@neolit123 I think we can handle RC by using --allow-experimental-upgrades too?

--allow-experimental-upgrades        Show unstable versions of Kubernetes as an upgrade alternative and allow upgrading to an alpha/beta/release candidate versions of Kubernetes.
--allow-release-candidate-upgrades   Show release candidate versions of Kubernetes as an upgrade alternative and allow upgrading to a release candidate versions of Kubernetes.

@neolit123
Copy link
Member

that's true.

if the user types:

kubeadm upgrade plan --allow-release-candidate-upgrades

to my understanding it would print:

You can now apply the upgrade by executing the following command:

        kubeadm upgrade apply <some-RC-version> --allow-experimental-upgrades

so it's a question if we want to print the exact --allow-..... flag that the user initially entered.
--allow-experimental-upgrades would be valid.

@xlgao-zju
Copy link
Contributor Author

Maybe this is better instead of using the user's initial flag?

When the version is RC:

You can now apply the upgrade by executing the following command:

        kubeadm upgrade apply <some-RC-version> --allow-release-candidate-upgrades

when the version is some other unstable version:

You can now apply the upgrade by executing the following command:

        kubeadm upgrade apply <some-other-unstable-version> --allow-experimental-upgrades

@xlgao-zju
Copy link
Contributor Author

@neolit123 And using the user's initial flag will make it difficult to deal with the test cases....

@chuckha
Copy link
Contributor

chuckha commented Jul 5, 2018

@xlgao-zju we should support both flags, I like the idea of printing the correct one based on the suggested version instead of printing the flag the user passed in even though that's the only time we'll see this output.

Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 6, 2018
@xlgao-zju
Copy link
Contributor Author

@chuckha @neolit123 Updated based on:

the correct one based on the suggested version

PTAL

@neolit123
Copy link
Member

@xlgao-zju
thanks, the change seems good.

waiting on @chuckha for confirmation.

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

@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, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: luxas, neolit123, xlgao-zju

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 Jul 6, 2018
@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 2d288a7 into kubernetes:master Jul 7, 2018
@xlgao-zju xlgao-zju deleted the improve-output branch July 8, 2018 03:38
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 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/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.

kubeadm upgrade plan output should also print required flags
6 participants