Upgrading PGO v5 Using Helm
Once PGO v5 has been installed with Helm, it can then be upgraded using the helm upgrade
command. However, before running the upgrade
command, any CustomResourceDefinitions (CRDs) must first be manually updated. (This is specifically due to a design decision in Helm v3, in which any CRDs in the Helm chart are only applied when using the helm install
command.)
If you would like, before upgrading the CRDs, you can review the changes with kubectl diff
. They can be verbose, so a pager like less
may be useful:
kubectl diff -f helm/install/crds | less
Use the following command to update the CRDs using server-side apply before running helm upgrade
. The --force-conflicts
flag tells Kubernetes that you recognize Helm created the CRDs during helm install
.
kubectl apply --server-side --force-conflicts -f helm/install/crds
Then, perform the upgrade using Helm:
helm upgrade <name> -n <namespace>
Upgrading from PGO v5.0.5 and Below
Starting in PGO v5.1, new pgBackRest features available in version 2.38 are used that impact both the crunchy-postgres
and crunchy-pgbackrest
images. For any clusters created before v5.0.6, you will need to update these image values BEFORE upgrading to PGO v5.1 and higher.
If you are using the RELATED_IMAGE
environment variables to set the image versions, you would need to update your values.yaml
file, found in the install
directory. There you will note a relatedImages
section. Again, be sure to update pgbackrest
as well as the appropriate postgres
value for your clusters.
Upgrading from PGO v5.3.x and Below
PGO versions earlier than v5.4.0 include a pgo-upgrade deployment. When upgrading to v5.4.x, users should expect the pgo-upgrade deployment to be deleted automatically.