Skip to content
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

CloudNative-PG upgrade #239

Open
maximemoreillon opened this issue Jul 14, 2024 · 1 comment
Open

CloudNative-PG upgrade #239

maximemoreillon opened this issue Jul 14, 2024 · 1 comment

Comments

@maximemoreillon
Copy link

maximemoreillon commented Jul 14, 2024

Summary

I have enabled the CloudNative-PG addon which installed CNPG v1.22.0 in my K8s cluster. I woud now like to upgrade CNPG to v1.23.2. How should I proceed?

Running microk8s.enable cloudnative-pg 1.23.2 results in Addon community/cloudnative-pg is already enabled and microk8s.disable cloudnative-pg would delete my PostgreSQL clusters.

Why is this important?

Newer version of CNPG bring various improvements that users would benefit from.

Are you interested in contributing to this feature?

If it is within my abilities

@maximemoreillon
Copy link
Author

maximemoreillon commented Jul 14, 2024

Currently, I am considering two options:

Option 1 would be to manually upgrade CNPG as describe in the official documentation, using

kubectl apply --server-side -f \
  https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.23/releases/cnpg-1.23.2.yaml

However, doing so results in multiple errors like these:

Apply failed with 3 conflicts: conflicts with "kubectl-client-side-apply" using admissionregistration.k8s.io/v1:
- .webhooks[name="mbackup.cnpg.io"].rules
- .webhooks[name="mcluster.cnpg.io"].rules
- .webhooks[name="mscheduledbackup.cnpg.io"].rules
Please review the fields above--they currently have other managers. Here
are the ways you can resolve this warning:
* If you intend to manage all of these fields, please re-run the apply
  command with the `--force-conflicts` flag.
* If you do not intend to manage all of the fields, please edit your
  manifest to remove references to the fields that should keep their
  current managers.
* You may co-own fields by updating your manifest to match the existing
  value; in this case, you'll become the manager if the other manager(s)
  stop managing the field (remove it from their configuration).
See https://kubernetes.io/docs/reference/using-api/server-side-apply/#conflicts

Option 2 would be to delete kubectl-cnpg in /var/snap/microk8s/current/bin/, tricking the addon enable command into thinking the addon is not installed and run

microk8s.enable cloudnative-pg 1.23.2

Any opinions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant