Update instructions for upgrading cert-manager resources and CRDs#793
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: irbekrm The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
✔️ Deploy Preview for cert-manager-website ready! 🔨 Explore the source changes: 663378c 🔍 Inspect the deploy log: https://app.netlify.com/sites/cert-manager-website/deploys/61dddce188a8c000075b5088 😎 Browse the preview: https://deploy-preview-793--cert-manager-website.netlify.app/docs/installation/upgrading/remove-deprecated-apis |
2cd31c3 to
645a335
Compare
content/en/docs/installation/upgrading/remove-deprecated-apis.md
Outdated
Show resolved
Hide resolved
645a335 to
3fbe4bb
Compare
|
I've tried to add a wording that suggests that these instructions should be applied with caution and also some scripts to verify that things have been upgraded, but it does feel like this is now a bit verbose- happy to remove some of the verbosity or scripts if suggested :) |
content/en/docs/installation/upgrading/remove-deprecated-apis.md
Outdated
Show resolved
Hide resolved
|
/hold some related conversation here https://kubernetes.slack.com/archives/CDEQJ0Q8M/p1641311819078800 We might end up putting all those steps into a tool |
content/en/docs/installation/upgrading/remove-deprecated-apis.md
Outdated
Show resolved
Hide resolved
|
The cmctl tool has now merged, so we should reword this PR to explain how and when to use the tool |
3fbe4bb to
b8d1b0a
Compare
f757fd7 to
1472747
Compare
Signed-off-by: irbekrm <irbekrm@gmail.com>
1472747 to
ec8813b
Compare
maelvls
left a comment
There was a problem hiding this comment.
I have tested the instructions performed:
- one upgrade from v1.6.1 to v1.7.0-alpha.0,
- one upgrade from v1.5.3 to v1.6.1.
Both went smoothly.
That said, could we give some indication to people who use a GitOps-like flow? The step (4) seems to indicate the command has to be run locally, which isn't possible for people using a GitOps flow (cc @jsoref)
| - `acme.cert-manager.io/v1alpha3` | ||
| - `acme.cert-manager.io/v1beta1` | ||
|
|
||
| These APIs are no longer served in cert-manager `v1.6` and are fully removed in cert-manager `v1.7`. If you have a cert-manager installation that is using or has previously used these deprecated APIs you might need to upgrade your cert-manager custom resources and CRDs. This should be done before upgrading to cert-manager `v1.6` or later. |
There was a problem hiding this comment.
nit: Terminology uses the leading v to refer to cert-manager git tags (we also call these "patch releases" I think). I think by v1.6 you mean "release branch" which may be instead written "1.6" 😇 (I know I know I am way too picky)
| These APIs are no longer served in cert-manager `v1.6` and are fully removed in cert-manager `v1.7`. If you have a cert-manager installation that is using or has previously used these deprecated APIs you might need to upgrade your cert-manager custom resources and CRDs. This should be done before upgrading to cert-manager `v1.6` or later. | |
| These APIs are no longer served in cert-manager 1.6 and are fully removed in cert-manager 1.7. If you have a cert-manager installation that is using or has previously used these deprecated APIs you might need to upgrade your cert-manager custom resources and CRDs. This should be done before upgrading to cert-manager 1.6 or later. |
|
|
||
| 3. Make sure that any cert-manager custom resource manifests that refer to the deprecated APIs are updated to use the `cert-manager.io/v1` API and re-applied. You can use the [cmctl convert command](https://cert-manager.io/docs/usage/cmctl/#convert)to convert manifests. | ||
|
|
||
| 4. Run [cmctl upgrade migrate-api-version command](https://cert-manager.io/docs/usage/cmctl/#migrate-api-version) to migrate any resources that might be stored in `etcd` at the deprecated API versions and to patch the cert-manager CRDs. |
There was a problem hiding this comment.
| 4. Run [cmctl upgrade migrate-api-version command](https://cert-manager.io/docs/usage/cmctl/#migrate-api-version) to migrate any resources that might be stored in `etcd` at the deprecated API versions and to patch the cert-manager CRDs. | |
| 4. Run the command [`cmctl upgrade migrate-api-version`](https://cert-manager.io/docs/usage/cmctl/#migrate-api-version) to migrate any resources that might be stored in `etcd` at the deprecated API versions and to patch the cert-manager CRDs. |
There was a problem hiding this comment.
We should also propose or suggest a GitOps way to run this command. For example, we could suggest to create a Job and mention that an image of cmctl exists. What do you think @jsoref?
There was a problem hiding this comment.
Job will not be able to act as a gate for upgrade - then we have to tell folks to check the job status etc. I think that running the tool from command line by default is probably safer and do it from a script in case of many clusters
There was a problem hiding this comment.
Ah right yes, that's a good point. I don't really know how people manage this, since sometimes the only possibility is to commit to a git repository (as opposed to manually running kubectl).
I pinged people on #argo-cd (CNCF slack) just to make sure I understand what people think about this upgrade path.
There was a problem hiding this comment.
Yes, that's a good point, I imagine there is some approach for these kind of situations. I suppose in this case, the simplest solution would be to commit a Job that runs the command and check that it succeeded before upgrading.. but there might be a better solution
content/en/docs/installation/upgrading/remove-deprecated-apis.md
Outdated
Show resolved
Hide resolved
content/en/docs/installation/upgrading/remove-deprecated-apis.md
Outdated
Show resolved
Hide resolved
I think they should just run it from a script then, unless they use helm or something else that has a concept of pre-install hook. |
Co-authored-by: Maël Valais <mael@vls.dev> Update content/en/docs/installation/upgrading/remove-deprecated-apis.md Co-authored-by: Maël Valais <mael@vls.dev> Signed-off-by: irbekrm <irbekrm@gmail.com>
a64e063 to
663378c
Compare
|
Thanks for writing this PR 🙏🙏 /lgtm |
|
/unhold |
|
@irbekrm Do you think we can remove |
Update the instructions how to ensure that cert-manager resources are stored in etcd at v1 and that the deprecated API versions are not recorded on CRD status fields to refer to the new
cmctl upgrade migrate-api-versioncommandTesting the upgrade
helm install cert-manager jetstack/cert-manager -ncert-manager --create-namespace --set installCRDs=true --version v0.16These will be stored in etcd at
v1beta1which is the preferred storage version for cert-manager v0.16helm upgrade cert-manager jetstack/cert-manager -ncert-manager --create-namespace --set installCRDs=true --version v1.6.18.Run
cmctl upgrade migrate-api-versionv1.7.0-alpha.0Signed-off-by: irbekrm irbekrm@gmail.com
/kind cleanup