-
Notifications
You must be signed in to change notification settings - Fork 1.9k
helm upgrade fails due to 'cannot patch "elasticsearch-master" with kind StatefulSet' #492
Comments
I have the same issue, following up the thread. |
Those helm chart are not supporting officially Helm 3. I read this information in the Readme.md. As a friendly information :) But I also want those chart be supported by helm 3 so I will keep a eye on this issue 👍 |
I possible way to workaround is to use this chart with helm 3 but by using |
@metabsd Thanks for the info. How did your test with |
same here. I am using helm v2.15.2 |
Hi @sot001,
|
Also comparing the StatefulSet template generating with 7.5.1 and 7.6.0 releases and your values, I don't see any difference that could generate a "cannot patch" issue.
Did you change anything in your values during the upgrade? |
Note that I'm doing these tests with Helm 3.2.4 |
Hi @jmlrt I ran my upgrade with Helm 3.0.2 so perhaps there has been a change in the way helm handles stateful sets with 3.2.x? I didn't change anything in my values from what is stated above. |
My chart was initially launched with helm v2 and migrated via the 2to3 plugin. Whilst it all seemed to migrate ok, perhaps this introduced the problem I am seeing. So unless other reporters above are seeing the same issue, I think it's not worth spending any more time on it given you can't recreate it and mine may be an edge case. |
IMO it's related to this issue: helm/charts#7803 So we need to remove |
Indeed the issue is related to Note that This is is impacting only people migrating from Helm 2 to Helm 3 and removing However removing this label will also impact every people upgrading from version with |
|
What exactly you are doing here? I got a freshly installed 6.8.13 Helm Chart and this error exists since 2018. Now I wanted to upgrade the PV size and I got this error. So tell me how to proceed????? |
This was my workaround for increasing PV (tested on GKE):
Delete Statefulset (Pods will not be removed):
Now you are able to upgrade via helmfile or whatever you use. After that you will see that the pvc will not be updated. So in case of GKE you can manually update the pvc and raise to the needed size. Another quick workaround would be to raise replicas so that data is more distributed over nodes as long as you cannot increase pvc size via helm chart because of this bug But you really need to get that fixed! It can't be that a problem which exists till 2018 is still in this version! |
Hi @elwood218, This issue relates to Elasticsearch chart upgrade issue when migrating from Helm 2 to Helm 3. AFAIK, your problem don't seem related at all with this current issue, so whatever your problem really is, I would ask you to post your comments on some issue really related to it or create a new issue with all the details requested in our bug report template if it's a bug or use feature request template if you're asking for a new feature missing in this chart. Thanks |
Hi @jmlrt , you closed the other issue and were only assuming that it is related to helm but obviously it is a general problem because I got exactly the same error and I do not have helm 3. |
Hi @jmlrt , |
Chart version:
7.6.0
Kubernetes version:
v1.14.9-eks-c0eccc
Kubernetes provider: E.g. GKE (Google Kubernetes Engine)
EKS
Helm Version:
v3.0.2
helm get release
outputOutput of helm get release
NOTE: the images above show 7.6.0 as I have manually updated the statefulset as a workaround.
Describe the bug:
Performing 'helm upgrade' returns the following error;
Error: UPGRADE FAILED: cannot patch "elasticsearch-master" with kind StatefulSet: StatefulSet.apps "elasticsearch-master" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden
Steps to reproduce:
Expected behavior:
Successful upgrade to newer image
Provide logs and/or server output (if relevant):
Any additional context:
I manually updated the statefulset to get around the problem, hoping helm would then recognise the new image version was in place, however that has gained me nothing. The upgrade still fails
The text was updated successfully, but these errors were encountered: