-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 clusterctl upgrade cert manager before upgrading providers #3364
🌱 clusterctl upgrade cert manager before upgrading providers #3364
Conversation
/milestone v0.3.9 |
4d6f723
to
2c1f290
Compare
23c76ce
to
cc648c5
Compare
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.
Tested this out locally and the upgrade works.
A couple of things:
- I think we should document that now
clusterctl upgrade apply
will also try upgrading cert-manager? - Should we have an entry in the
clusterctl upgrade plan
to check cert-manager versions as well? This need not be part of this PR.
case c < 0: | ||
// if version < current, then upgrade | ||
currentVersion = objVersion | ||
needUpgrade = true |
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.
Could we break
here? Then we may not need the if needUpgrade
check below on line 281.
This way we have a consistent pattern that everywhere needUpgrade = true
we break
.
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.
If we break here, we are breaking the switch statement while the goal of the statement on line 281 is to break the for loop
ecca906
to
89d13cd
Compare
@wfernandes thanks for the feedback
This makes sense |
We can open a separate issue to track this work.
/lgtm |
Squash commits? |
// NOTE: // If the cert-manager.yaml asset is modified, this line **MUST** be updated | ||
// accordingly else future upgrades of the cert-manager component will not | ||
// be possible, as there'll be no record of the version installed. | ||
embeddedCertManagerManifestVersion = "v0.16.0" |
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.
We should use v0.16.1 given that it was just released
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.
If it is ok for you I will send a separate PR as soon as this one merge
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.
I was going to suggest a separate PR because that way we can test out what updating the cert-manager manifest would look like.
// NOTE: // If the cert-manager.yaml asset is modified, this line **MUST** be updated | ||
// accordingly else future upgrades of the cert-manager component will not | ||
// be possible, as there'll be no record of the version installed. | ||
embeddedCertManagerManifestVersion = "v0.16.0" | ||
|
||
// NOTE: The hash is used to ensure that when the cert-manager.yaml file is updated, | ||
// the version number marker here is _also_ updated. | ||
// You can either generate the SHA256 hash of the file, or alternatively | ||
// run `go test` against this package. THe Test_VersionMarkerUpToDate will output | ||
// the expected hash if it does not match the hash here. | ||
embeddedCertManagerManifestHash = "5770f5f01c10a902355b3522b8ce44508ebb6ec88955efde9a443afe5b3969d7" |
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.
Should we be hardcoding versions and hashes within the codebase? Can we open an issue to get rid of this or find an alternative that doesn't require code changes?
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 was inherited from #3313 and slightly re-worked here.
So far we have a unit test that ensures this value is in sync with the embedded manifest.
But happy to open an issue for another round of improvement
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.
/assign |
89d13cd
to
6e0e62d
Compare
squashed commits |
@fabriziopandini: The following test failed, say
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. |
/lgtm |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
What this PR does / why we need it:
This PR extends
clusterctl upgrade
in order to manage cert-manager upgrades before upgrading providersThis PR builds on top of #3313, which is not yet merged. In the meantime, please consider the latest commit only