Skip to content

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

Merged
merged 4 commits into from
Apr 14, 2025

Conversation

nastena1606
Copy link
Collaborator

@nastena1606 nastena1606 commented Mar 31, 2025

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

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`.
Copy link
Contributor

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.

Copy link
Collaborator Author

@nastena1606 nastena1606 Apr 8, 2025

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.
Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Collaborator Author

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

Copy link
Collaborator Author

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
```
Copy link
Contributor

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

@it-percona it-percona temporarily deployed to K8SPXC-1499-Migrate-to-crd1 - percona-mysql-operator-pxc PR #223 April 10, 2025 18:03 — with Render Destroyed
@nastena1606 nastena1606 added the pending_release PR is ready to be included in the upcoming release label Apr 10, 2025
@nastena1606 nastena1606 merged commit 0ca5e0c into main Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending_release PR is ready to be included in the upcoming release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants