helm repo update stackgres-charts
To upgrade the operator you may use the following command:
helm upgrade --namespace stackgres stackgres-operator \
--values my-operator-values.yml \
stackgres-charts/stackgres-operator
Important note: Do not use the
--reuse-values
option from Helm since it prevent the new operator helm chart to add new default values. Pass your installation params using the values file or setting the values directly in the command using--set-string
or--set
option.
The main recommendation is to pass the same installation values in the upgrade command or use a values.yaml file.
Upgrade of an operator can serve two purpose:
After the upgrade completes any new cluster that will be created, will be created with the new updated components. Existing clusters will work using the previous version of the operator. They will be able to use some or all the features added in the new operator version and will receive bugfixes (may require a cluster restart). To make all the new functionalities that the new operator version brings a cluster security upgrade have to be performed. There are two methods to perform such operation: in-place and reduced-impact. Both methods are essentially the same but reduced-impact allow to minimize throughput reduction for read-only connections (draining will not be applied here) or for read-write connections when a single node clusters is used.
After the upgrade the StackGres custom resource YAMLs may receive some expected change. Each release note will describe those changes and in general there is no need to perform any action in order to maintain compatibility with the previous version of StackGres custom resource YAMLs that are maintained outside of Kubernetes API (git, helm or argocd). If any unexpected behavior appear please, read the following sections that includes the changes provided by each operator release that affect the same version of StackGres custom resources and update the YAMLs stored outside of Kubernetes API accordingly.
.spec.configurations.sgBackupConfig
has been deprecated and replaced by .spec.configurations.backups[0].sgObjectStorage
..spec.configurations.backupPath
has been deprecated and replaced by .spec.configurations.backups[0].path
..spec.initialData.scripts
has been deprecated and replaced by .spec.managedSql
and stackgres.io/v1/SGScript..spec.configurations.backups[0]
under stackgres.io/v1/SGCluster.spec.containers
and .spec.initContainers
section with default memory and CPU resources requests and limits restrictions were added. Those resources requests and limits
are applied by default to the cluster’s Pods for new stackgres.io/v1/SGCluster. For existing stackgres.io/v1/SGCluster the field .spec.nonProductionOptions.disableClusterResourceRequirements
is set to true
in order to maintain the previous memory and CPU resources requests and limits restrictions that are only enforced on the patroni container..status.sgBackupConfig.baseBackups.performance.maxDiskBandwitdh
has been deprecated and replaced by .status.sgBackupConfig.baseBackups.performance.maxDiskBandwidth
.status.sgBackupConfig.baseBackups.performance.maxNetworkBandwitdh
has been deprecated and replaced by .status.sgBackupConfig.baseBackups.performance.maxNetworkBandwidth
.spec.baseBackups.performance.maxDiskBandwitdh
has been deprecated and replaced by .spec.baseBackups.performance.maxDiskBandwidth
.spec.baseBackups.performance.maxNetworkBandwitdh
has been deprecated and replaced by .spec.baseBackups.performance.maxNetworkBandwidth
.status.labelPrefix
with default value of an empty string..status.labelPrefix
with default value of an empty string..spec.flavor
with default value of vanilla
.