ibm-messaging / mq-helm

Apache License 2.0
28 stars 34 forks source link

Queue Manager Redeploy after Helm Chart Upgrade #41

Closed schmiuwe closed 1 year ago

schmiuwe commented 1 year ago

Hi Callum,

as discussed today: I switched the MQ helm chart in our repository from version 3.0.0 to latest version 5.0.0 lately. After push to main ArgoCD picked it up but deployment did not succeed after several tries. Only thing that helped to get it deployed was to delete the Queue Manager and redeploy it from scratch.

The error message I got in ArgoCD: "StatefulSet.apps "t01n01k-ibm-mq" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden."

Thank you, Uwe

callumpjackson commented 1 year ago

Hi Uwe, Thanks for raising this issue. The above problem is occurring as we are including metadata labels within the volumeClaimTemplates section of the statefulset. One of these labels include the version of the helm chart, which then prevents the upgrade as Kubernetes will not allow any modifications to this part of the statefulset. Moving forward we will remove any labels within the volumeClaimTemplates that include product or helm chart versions to avoid this occurring in new deployments. Unfortunately as existing deployments already have this present there is little we can do for historically deployed queue managers. In this case the kubernetes resources will need to be deleted, but leaving the PVC claims, and then another deployment which can utilize the same storage. It is worth saying that as we increase major helm versions it may not always be possible to complete a helm upgrade as backward compatibility is not always possible, but in this case it should be.

callumpjackson commented 1 year ago

Closing as addressed in latest helm chart release