[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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 upgrade plan: print a component config state table #88124

Merged
merged 2 commits into from
Jul 3, 2020

Conversation

rosti
Copy link
Contributor
@rosti rosti commented Feb 13, 2020

What type of PR is this?
/kind feature

What this PR does / why we need it:

This change enables kubeadm upgrade plan to print a state table with information regarding known component config API groups. Most importantly this information includes current and preferred version for each group and an indication if a manual config upgrade is required.

In addition to that, this PR also replaces most of the versioned use of the output API in kubeadm upgrade plan with the internal types.

Which issue(s) this PR fixes:

Refs:

Special notes for your reviewer:

This PR is part of the implementation of the new kubeadm component config management scheme KEP (see link below). It also depends on #91980 . Please, review the last 2 commits only!

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/area kubeadm
/priority important-longterm
/assign @fabriziopandini @neolit123 @ereslibre
/hold

Does this PR introduce a user-facing change?:

kubeadm: upgrade plan now prints a table indicating the state of known component configs prior to upgrade

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: https://github.com/kubernetes/enhancements/blob/master/keps/sig-cluster-lifecycle/kubeadm/20190925-component-configs.md

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Feb 13, 2020
@k8s-ci-robot k8s-ci-robot added sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. kind/feature Categorizes issue or PR as related to a new feature. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. area/kubeadm priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 13, 2020
@rosti rosti force-pushed the kubeadm-cc-upgrade-plan branch from 0068d9a to 604f0ee Compare February 13, 2020 17:43
@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 13, 2020
@neolit123
Copy link
Member

@rosti can you please show example output?

@@ -75,7 +75,7 @@ func getK8sVersionFromUserInput(flags *applyPlanFlags, args []string, versionIsM
}

// enforceRequirements verifies that it's okay to upgrade and then returns the variables needed for the rest of the procedure
func enforceRequirements(flags *applyPlanFlags, dryRun bool, newK8sVersion string) (clientset.Interface, upgrade.VersionGetter, *kubeadmapi.InitConfiguration, error) {
func enforceRequirements(plan bool, flags *applyPlanFlags, dryRun bool, newK8sVersion string) (clientset.Interface, upgrade.VersionGetter, *kubeadmapi.InitConfiguration, error) {
Copy link
Member

Choose a reason for hiding this comment

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

cc @Klaven

@rosti
Copy link
Contributor Author
rosti commented Feb 14, 2020

Sample output:

# kubeadm upgrade plan --allow-experimental-upgrades
...
Components that must be upgraded manually after you have upgraded the control plane with 'kubeadm upgrade apply':
COMPONENT   CURRENT                                        AVAILABLE
Kubelet     1 x v1.18.0-alpha.2.584+f29ad2e1cc3596-dirty   v1.18.0-alpha.5

Upgrade to the latest experimental version:

COMPONENT            CURRENT                                    AVAILABLE
API Server           v1.18.0-alpha.2.584+f29ad2e1cc3596-dirty   v1.18.0-alpha.5
Controller Manager   v1.18.0-alpha.2.584+f29ad2e1cc3596-dirty   v1.18.0-alpha.5
Scheduler            v1.18.0-alpha.2.584+f29ad2e1cc3596-dirty   v1.18.0-alpha.5
Kube Proxy           v1.18.0-alpha.2.584+f29ad2e1cc3596-dirty   v1.18.0-alpha.5
CoreDNS              1.6.5                                      1.6.5
Etcd                 3.4.3                                      3.4.3-0

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

        kubeadm upgrade apply v1.18.0-alpha.5 --allow-experimental-upgrades

Note: Before you can perform this upgrade, you have to update kubeadm to v1.18.0-alpha.5.

_____________________________________________________________________


The table below shows the current state of component configs as understood by this version of kubeadm.
Configs that have a "yes" mark in the "USER ACTION REQUIRED" column require manual config upgrade or
resetting to kubeadm defaults before a successful upgrade can be performed. The version to manually
upgrade to is denoted in the "PREFERRED VERSION" column.

API GROUP                 CURRENT VERSION   PREFERRED VERSION   USER ACTION REQUIRED
kubeproxy.config.k8s.io   v1alpha1          v1alpha1            no
kubelet.config.k8s.io     v1beta1           v1beta1             no
_____________________________________________________________________
#

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 23, 2020
@rosti rosti force-pushed the kubeadm-cc-upgrade-plan branch from 604f0ee to 523ad8f Compare May 19, 2020 14:50
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 19, 2020
@rosti rosti force-pushed the kubeadm-cc-upgrade-plan branch from 523ad8f to bb72eac Compare May 19, 2020 15:42
@rosti rosti changed the title kubeadm upgrade plan: print a component config state table [WIP] kubeadm upgrade plan: print a component config state table Jun 8, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 8, 2020
@rosti rosti force-pushed the kubeadm-cc-upgrade-plan branch 2 times, most recently from bc82e94 to 9bd4103 Compare June 11, 2020 16:01
@rosti rosti changed the title [WIP] kubeadm upgrade plan: print a component config state table kubeadm upgrade plan: print a component config state table Jun 11, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 11, 2020
@neolit123
Copy link
Member

/milestone v1.19

@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Jun 15, 2020
@rosti rosti force-pushed the kubeadm-cc-upgrade-plan branch from 9bd4103 to 73c6e28 Compare June 22, 2020 16:38
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rosti

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

@rosti
Copy link
Contributor Author
rosti commented Jun 23, 2020

/retest

rosti added 2 commits June 24, 2020 16:47
`kubeadm upgrade plan` is using the external (currently `v1alpha1`) types of
the kubeadm output API to collect upgrade plans. This is counter intuitive
since code structure gets bound to the whatever version the output API is at.
In addition to that, the versioned API is used only in the very last stages of
a machine readable output (which is currently not implemented).

Hence, to increase flexibility and keep up with the standard Kubernetes
ecosystem practice, `kubeadm upgrade plan` is migrated to use the internal
types of the output API.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
This change enables kubeadm upgrade plan to print a state table with
information regarding known component config API groups. Most importantly this
information includes current and preferred version for each group and an
indication if a manual user upgrade is required.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
@rosti rosti force-pushed the kubeadm-cc-upgrade-plan branch from 73c6e28 to 709e3c3 Compare June 24, 2020 14:41
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 24, 2020
@neolit123
Copy link
Member

/lgtm
/retest

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 29, 2020
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.

/hold cancel
we have a number of PRs in the queue and it might be quite packed this cycle.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 1, 2020
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

5 similar comments
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@k8s-ci-robot
Copy link
Contributor

@rosti: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kubernetes-e2e-gce 709e3c3 link /test pull-kubernetes-e2e-gce
pull-kubernetes-e2e-kind 709e3c3 link /test pull-kubernetes-e2e-kind

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

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/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. 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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants