Kubernetes statefulset has many properties and most are not changeable after deployment. When running a helm upgrade, helm will generate a new statefulset template. If the new template changed anything other than 'replicas', 'template', and 'updateStrategy' in the spec filed, you will see the following messages:
Error: UPGRADE FAILED: StatefulSet.apps "artifactory-ha-artifactory-ha-member" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden && StatefulSet.apps "artifactory-ha-artifactory-ha-primary" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden
In some cases, the error message will give the file that's rejecting the change. However, for a generic error like the one above, you will need to find out what is causing the immutable error.
Changes in the statefulset template during helm upgrade usually come from two sources: change in values.yaml and change in chart version ( which changes the statefulset template in chart ). Here are some tips to the debug steps: