cluster-api
cluster-api copied to clipboard
✨ Improve clusterctl upgrade syntax. Don't require namespace
What this PR does / why we need it:
Here is the shorted output of a script that creates a quickstart cluster and then performs a clusterctl upgrade with the improved syntax.
(... a new cluster )
+ ../bin/clusterctl upgrade plan
Checking cert-manager version...
Cert-Manager will be upgraded from "v1.5.3" to "v1.9.1"
Checking new release availability...
Latest release available for the v1beta1 API Version of Cluster API (contract):
NAME NAMESPACE TYPE CURRENT VERSION NEXT VERSION
bootstrap-kubeadm capi-kubeadm-bootstrap-system BootstrapProvider v1.0.5 v1.2.2
control-plane-kubeadm capi-kubeadm-control-plane-system ControlPlaneProvider v1.0.5 v1.2.2
cluster-api capi-system CoreProvider v1.0.5 v1.2.2
infrastructure-docker capd-system InfrastructureProvider v1.0.5 v1.2.2
You can now apply the upgrade by executing the following command:
clusterctl upgrade apply --contract v1beta1
+ ../bin/clusterctl upgrade apply --infrastructure docker:v1.1.6
Checking cert-manager version...
Deleting cert-manager Version="v1.5.3"
Installing cert-manager Version="v1.9.1"
Waiting for cert-manager to be available...
Performing upgrade...
Scaling down Provider="infrastructure-docker" Version="" Namespace="capd-system"
Deleting Provider="infrastructure-docker" Version="" Namespace="capd-system"
Installing Provider="infrastructure-docker" Version="v1.1.6" TargetNamespace="capd-system"
If we try to upgrade docker again with the current (unmodified) clusterctl version:
clusterctl upgrade apply --infrastructure docker:v1.2.2
Checking cert-manager version...
Cert-manager is already up to date
Error: invalid provider name "docker:v1.2.2". Provider name should be in the form namespace/provider[:version]
I also sneaked in some spelling mistake fixes where I found them during development.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #7319
cc @ykakarap
Awesome! Thank you @fabriziopandini for the review and fixing the docs part that I totally forgot about.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign timothysc for approval by writing /assign @timothysc in a comment. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
I had some downtime so I upgraded the documentation to cover this change.
Since this change will earliest be in 1.4 due to the feature freeze, I will rebase it when there is a separate 1.3 branch and we have an v1.3-to-v1.4 document. But if there is any feedback before them I will of course fix it immediately.
PR has now been rebased with main, changes added to a Cluster API v1.3 compared to v1.4 doc and fixed the documentation about the new clusterctl upgrade syntax .
@ykakarap @fabriziopandini When you have some time, what would be the next steps for this PR?
I think we lost a bit track of it.
This is ready to merge after the release IMO,
Sounds good to me. We can merge independent of the release when we're ready, but I wouldn't force it into v1.3.0.
We can discuss if the PR is eligible for cherry-pick after merge.
/assign @fabriziopandini for approval.
/lgtm /approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: fabriziopandini
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [fabriziopandini]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@ykakarap @fabriziopandini @sbueringer Thank you once again for all your help and feedback with this pr :pray: