Getting UPGRADE FAILED: cannot patch "postgresql-postgresql" while upgrading Devtron to newer versions

Getting UPGRADE FAILED: cannot patch "postgresql-postgresql" while upgrading Devtron to newer versions

Debug:

  1. Make sure to annotate and label all the Devtron resources.
  2. Description of error
Error: UPGRADE FAILED: cannot patch "postgresql-postgresql" with kind StatefulSet: StatefulSet.apps "postgresql-postgresql" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', 'updateStrategy' and 'minReadySeconds' are forbidden
Solution: Verify if annotations & labels are set to all k8s resources in devtroncd namespace and add --set components.postgres.persistence.volumeSize=20Gi parameter in Devtron upgrade command.
helm upgrade devtron devtron/devtron-operator --namespace devtroncd \
--set installer.modules={cicd} --reuse-values \
--set components.postgres.persistence.volumeSize=20Gi