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

Helm Upgrade -- Error: UPGRADE FAILED: cannot patch "concourse-ci-postgresql" with kind StatefulSet #295

Open
mlopez-eb opened this issue Mar 8, 2022 · 2 comments

Comments

@mlopez-eb
Copy link

mlopez-eb commented Mar 8, 2022

Made a simple change to values.yaml file to enable enableAcrossStep.
Ran the following upgrade command & received the error:

> helm upgrade concourse-ci concourse/concourse -f values.yaml --namespace=concourse
W0308 10:04:22.775295    6315 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0308 10:04:23.057213    6315 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0308 10:04:23.423974    6315 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
Error: UPGRADE FAILED: cannot patch "concourse-ci-postgresql" with kind StatefulSet: StatefulSet.apps "concourse-ci-postgresql" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden

> helm version
version.BuildInfo{Version:"v3.8.0", GitCommit:"d14138609b01886f544b2025f5000351c9eb092e", GitTreeState:"clean", GoVersion:"go1.17.6"}

> helm list
NAME        	NAMESPACE   	REVISION	UPDATED                             	STATUS  	CHART              	APP VERSION
concourse-ci	concourse   	12      	2022-03-08 10:04:14.032308 -0500 EST	failed  	concourse-16.0.3   	7.5.0

> fly -v
7.0.0

> kubectl version --short
Client Version: v1.23.4
Server Version: v1.21.5-eks-bc4871b
@philippeboyd
Copy link

+1, issue is still present with chart v16.1.24

@bookwalker
Copy link
Contributor

PostgreSQL chart dependency was updated with c2a3501.

This upgrade requires some manual ❤️ as it comes with two breaking changes [1]:

  1. the chart itself (therefore the Forbidden: updates to statefulset spec for fields other than 'replicas',... error)
  2. it bumps postgres from v11 to v14 (which requires data migration)

Migrate the chart

To apply the chart without requiring to migrate to postgres v14 pin the postgres image to the current version (eg. 11.14.0-debian-10-r28):

values.yaml:

concourse:
  postgresql:
    image:
      tag: 11.14.0-debian-10-r28
  1. 💾 backup (in case anything goes wrong)
  2. 🪣 delete the concourse-postgresql StatefulSet
  3. 🚀 then apply the Chart with the updates values.yaml

You're basically done here if you don't want to upgrade postgres itself. Otherwise continue with [2].

See also:

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

3 participants