-
Notifications
You must be signed in to change notification settings - Fork 270
🌱 Enable k8s upgrade in self hosted test #1732
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
🌱 Enable k8s upgrade in self hosted test #1732
Conversation
Skipping CI for Draft Pull Request. |
✅ Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lentzi90 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 |
/test pull-cluster-api-provider-openstack-e2e-full-test |
|
||
Test status: | ||
|
||
- `✓` tested | ||
- `★` currently testing | ||
- `✓` previously tested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is very great update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All credit goes to @wwentland 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit silly, but allow me to explain.
We need a separate OpenStackMachineTemplate with a different k8s version in order to do the upgrade. The test spec itself is making the switch from the initial template to the "upgrade to" template, that is specified in the e2e config.
Our normal template is already using k8s v1.28.2 so here I add a template witch v1.27.2 to get a different initial version.
The silly part is that we cannot upgrade to the "normal" template because it gets a dynamic name when applied in the test. All clusters are created with a random suffix and this propagates also to the template, so it is impossible to specify this template in the e2e config. We could change the naming scheme of the template to work around this. Let me know if you think this would be better. What I did instead was to just add another statically named template, so we end up with 2 extra templates for this test.
metadata: | ||
name: upgrade-to-control-plane | ||
labels: | ||
clusterctl.cluster.x-k8s.io/move: "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This label is important to get the (not yet in use) template moved to the self hosted cluster. Otherwise it would be left behind since it is not part of the owner chain at that point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I think it's something I tried to add into CAPO before, IIRC it's moving stuffs from boostrap to deployed cluster?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly. To be clear, it is only needed on this template because it is not part of the cluster owner chain. All resources that are part of the cluster are moved automatically. For example, the OpenStackMachineTemplates that are used when initializing the workload cluster are automatically moved.
This enables the k8s upgrade that is part of the self hosted test. It was previously disabled since the dynamic installation of kubernetes components on the nodes made it hard to change the version in the middle of a test. Also updated the README tables for what versions are tested.
8638e3e
to
4d500ed
Compare
/lgtm leave unhold to someone who might want to take another look |
/test pull-cluster-api-provider-openstack-e2e-full-test |
1 similar comment
/test pull-cluster-api-provider-openstack-e2e-full-test |
/hold cancel |
What this PR does / why we need it:
This enables the k8s upgrade that is part of the self hosted test. It was previously disabled since the dynamic installation of kubernetes components on the nodes made it hard to change the version in the middle of a test.
Also updated the README tables for what versions are tested.
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 #
Special notes for your reviewer:
TODOs:
/hold