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

redis - helm upgrades fail after moving from helm 2 to helm 3 #3482

Closed
rabidsloth opened this issue Aug 20, 2020 · 3 comments
Closed

redis - helm upgrades fail after moving from helm 2 to helm 3 #3482

rabidsloth opened this issue Aug 20, 2020 · 3 comments
Labels
stale 15 days without activity

Comments

@rabidsloth
Copy link

Which chart:
redis - seems like all versions

Describe the bug
After deploying the Bitnami redis chart with helm v2, and then migrating that deployment to helm v3 using the methods recommended by the Helm team, and then attempting to run helm upgrade on that deployment with helm v3, it fails with this error:

Error: UPGRADE FAILED: cannot patch "redis-deployment-name" with kind StatefulSet: StatefulSet.apps "redis-deployment-name" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden

To Reproduce
Steps to reproduce the behavior:

  1. Deploy redis chart with helm v2
  2. Convert the deployment using recommended methods
  3. Run a helm upgrade on that deployment with Helm v3
  4. See error

Expected behavior
The chart should be able to be converted to helm v3 and future updates to that deployment should work without error in v3

Version of Helm and Kubernetes:

  • Output of helm version:
v2:
Client: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}

v3: 
version.BuildInfo{Version:"v3.3.0", GitCommit:"8a4aeec08d67a7b84472007529e8097ec3742105", GitTreeState:"dirty", GoVersion:"go1.14.7"}
  • Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.6-beta.0", GitCommit:"e7f962ba86f4ce7033828210ca3556393c377bcc", GitTreeState:"clean", BuildDate:"2020-01-15T08:26:26Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15+", GitVersion:"v1.15.11-eks-14f01f", GitCommit:"14f01fe8f04411d5e187b220034ca2117d79f7de", GitTreeState:"clean", BuildDate:"2020-05-23T21:32:47Z", GoVersion:"go1.12.17", Compiler:"gc", Platform:"linux/amd64"}

Additional context

Looks like this issue is causing problems for the GitLab team as well as they use this chart to deploy redis. They have a blocker issue for it and even a comment about this chart as to where the issue might be.

I've also run into this on various redis deployments using this chart.

@andresbono
Copy link
Member

Hi @rabidsloth, we could reproduce the issue:

  • Helm 2: v2.16.10
  • Helm 3: v3.3.0
  • 2to3 plugin: 0.6.0
./helm2 install bitnami/redis --name redis --version 10.4.0
./helm3 plugin install https://github.com/helm/helm-2to3

./helm3 2to3 convert redis

./helm3 upgrade redis bitnami/redis --version 10.7.16
Error: UPGRADE FAILED: cannot patch "redis-master" with kind StatefulSet: StatefulSet.apps "redis-master" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden && cannot patch "redis-slave" with kind StatefulSet: StatefulSet.apps "redis-slave" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden

You will need to delete the statefulset and run the helm upgrade again:

kubectl delete statefulsets.apps --cascade=false redis-master redis-slave
./helm3 upgrade redis bitnami/redis --version 10.7.16

Note that by setting --cascade=false, the pods are not being deleted with kubectl delete and they are deleted in the rolling update when executing the helm upgrade command.

I hope you find this useful.

@stale
Copy link

stale bot commented Sep 5, 2020

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@stale stale bot added the stale 15 days without activity label Sep 5, 2020
@stale
Copy link

stale bot commented Sep 11, 2020

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@stale stale bot closed this as completed Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale 15 days without activity
Projects
None yet
Development

No branches or pull requests

2 participants