ibm-messaging / mq-helm

Apache License 2.0
28 stars 35 forks source link

Extending size of persistent storage in AKS #52

Closed JBarbes closed 1 year ago

JBarbes commented 1 year ago

Hi

In AKS it is possible to extend the size of the persistent volumes just by changing the PVC value of “resources.requests.storage”. After a little while persistent volumes are extended with the new size.

When I try so use the helm chart to update the PVC through volumeClaimTemplates:, using the override: persistence: qmPVC: enable: true size: 12Gi

I get the following error:

"Error: UPGRADE FAILED: cannot patch \"nativeha-s1-ibm-mq\" with kind StatefulSet: StatefulSet.apps \"nativeha-s1-ibm-mq\" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden"

It seems to be a restriction with helm that volumeClaimTemplates can’t be changed? If I do not use the helm chart to maintain the PVC’s, the helm chart will be out of sync with the live values. Will that be a problem? Can I circumvent the problem somehow ?

Rgds John Barbesgaard

callumpjackson commented 1 year ago

As you mention this is a generic Kubernetes StatefulSet issue. There is an interesting discussion in the community across several GitHub issues. I’ve included links for reference:

There is an active proposal for an enhancement being work here.

Which will hopefully improve the situation in the future, but until this is provided by Kubernetes we will need to fall back to a workaround similar to what you mention, and discussed in the issues above.

Updating the PVC under the covers shouldn’t cause any issues but you will need to assure the associated pods are disconnected from the storage for an adequate time for the resize to occur.

Closing the issue at this time, unless any additional information is required. Feel free to reopen as needed.