Skip to content

✨clusterctl: implement upgrade apply #2281

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

Conversation

fabriziopandini
Copy link
Member

@fabriziopandini fabriziopandini commented Feb 6, 2020

What this PR does / why we need it:
This PR implements the clusterctl upgrade apply command.

Which issue(s) this PR fixes :
Fixes #1988
Rif #1729
/area clusterctl
/assign @ncdc
/assign @vincepri

@k8s-ci-robot k8s-ci-robot added area/clusterctl Issues or PRs related to clusterctl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 6, 2020
@ncdc ncdc added this to the v0.3.0 milestone Feb 7, 2020
Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

Code overall looks good to me, seems pretty straightforward.

I did have a question around custom plans, is this an actual requirement for this release or a nice to have?

func newProviderUpgrader(configClient config.Client, repositoryClientFactory RepositoryClientFactory, providerInventory InventoryClient) *providerUpgrader {
func (u *providerUpgrader) ApplyPlan(coreProvider clusterctlv1.Provider, contract string) error {
log := logf.Log
log.Info("Performing upgrade...")
Copy link
Member

Choose a reason for hiding this comment

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

Can we pass the logger in from the caller and log this one out in ApplyUpgrade instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Uhmm, the whole idea around the implementation of a global logger was to avoid to pass the logger object through the call chain... If possible I prefer to keep this consistent with the rest of the code base

@fabriziopandini fabriziopandini force-pushed the clusterctl-upgrade-plan-apply branch from f1c5606 to 81695dc Compare February 10, 2020 19:35
@fabriziopandini
Copy link
Member Author

@vincepri
custom plans are nice to have, so I have removed them from this PR; I will re-submit this in a separated PR

@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 Feb 10, 2020
Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Feb 11, 2020
@k8s-ci-robot k8s-ci-robot merged commit 8b7ffa5 into kubernetes-sigs:master Feb 11, 2020
@fabriziopandini fabriziopandini deleted the clusterctl-upgrade-plan-apply branch February 11, 2020 20:08
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/clusterctl Issues or PRs related to clusterctl 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. 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.

Define constraints for upgrades crossing ClusterAPIVersion (e.g. v1alpha2-->v1alpha3)
4 participants