-
Notifications
You must be signed in to change notification settings - Fork 23
K8SPXC-1499 Added a step to manually upda #223
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
te the API version for CRD if the Operator is older than 1.12.0 dquote> dquote> Reworked the intro part to make a list of considerations modified: docs/update.md
docs/update.md
Outdated
|
||
If the your current Operator version and the version you want to upgrade to differ by more than one minor version, you need to upgrade step by step. For example, if your current version is `1.15.x` and you want to move to `1.17.x`, first upgrade to `1.16.x`, then to `1.17.x`. | ||
|
||
Patch versions don't influence the upgrade, so you can safely move from `1.16.1` to `1.17.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.
I think if we say 1.16.0
to 1.17.1
, it would be more understandable.
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 don't have 1.17.1
yet, that's why I used the versions available. I can amend to 1.15.1 to 1.16.1
docs/update.md
Outdated
should be able to continue using the old Operator version. | ||
But updating the CRD *and* Operator is the **recommended path**. | ||
|
||
3. Starting with version 1.12.0, the Operator no longer has a separate API version for each release in CRD. Instead, the CRD has the API version `v1`. Therefore, if you run the Operator **older than 1.12.0**, you must update the API version in the CRD manually to run the upgrade. |
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 only needed if user has an operator installation starting from a release before 1.12.0. so even if you have 1.16.0 operator running in the cluster, if you installed CRDs first from a version before 1.12.0 you will have this problem. to verify you can run kubectl get crd perconaxtradbclusters.pxc.percona.com -o yaml | yq .status.storedVersions
. if you have any other version than v1
in the list, you need to do this manual operation.
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 also need to document the manual operation:
$ kubectl proxy &
$ curl \
--header "Content-Type: application/json-patch+json" \
--request PATCH \
--data '[{"op": "replace", "path": "/status/storedVersions", "value":["v1"]}]' \
http://localhost:8001/apis/apiextensions.k8s.io/v1/customresourcedefinitions/perconaxtradbclusters.pxc.percona.com/status
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 command didn't work for me. It fails with the error:
[1] 37530 curl: (7) Failed to connect to localhost port 8001 after 1 ms: Couldn't connect to server Starting to serve on 127.0.0.1:8001
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 command didn't work for me. It fails with the error:
[1] 37530 curl: (7) Failed to connect to localhost port 8001 after 1 ms: Couldn't connect to server Starting to serve on 127.0.0.1:8001
Stupid me, it did work.
Added both ways to update CRD Changed versions Added how to check the API version in CRD
Co-authored-by: Ege Güneş <[email protected]>
```{.text .no-copy} | ||
- v1-11-0 | ||
- v1 | ||
``` |
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.
Maybe we also need to say "if you have anything other than v1
, you need to perform this operation
te the API version for CRD if the Operator is older than 1.12.0 Reworked the intro part to make a list of considerations
modified: docs/update.md