percona / everest

Percona Everest is a cloud-native database platform to deploy and manage enterprise-grade PostgreSQL, MongoDB and MySQL database clusters.
https://docs.percona.com/everest/index.html
Apache License 2.0
156 stars 10 forks source link

After upgrade from v1.0.1 to v1.1.0 only everest namespace showing in UI #586

Closed george-pogosyan closed 1 month ago

george-pogosyan commented 1 month ago

After upgrade from v1.0.1 to v1.1.0 only everest namespace showing in UI.

logs:

λ everestctl upgrade
✓ Upgrade Operator Lifecycle Manager
✓ Upgrade Percona Catalog
✓ Wait for Everest Operator InstallPlan
✓ Upgrade Everest API server
✓ Upgrade Everest Operator
✓ Run post-upgrade tasks
recharte commented 1 month ago

Hi @george-pogosyan, in this particular k8s cluster what was the first everest version you installed? Was it v1.0.1 or did you initially have v0.10.1 (or older) and then upgraded to v1.0.1?

recharte commented 1 month ago

Issue

In v1.0.0 we changed the way we list the managed namespaces. While everestctl v1.0.0's upgrade command had logic to upgrade from versions older than v1.0.0, everestctl v1.1.0 assumed that users wouldn't be running versions older that v1.0.0 and dropped the migration logic.

When you used everestctl v1.1.0 to upgrade your older than v1.0.0 version it missed the migration step needed to list the managed namespaces.

Preemptive fix

We have added a warning in the documentation and release notes explaining how avoid this.

Fix

Now that you found yourself in this situation, you can run the following command to fix your Everest environment.

kubectl get deployments everest-operator-controller-manager -n everest-system -o jsonpath='{.spec.template.spec.containers[?(@.name=="manager")].env[?(@.name=="DB_NAMESPACES")].value}' | tr ',' '\n' | xargs -I {} kubectl label namespaces {} app.kubernetes.io/managed-by=everest