I have an umbrella chart that i am installing on a kubernetes env. It contains 2 components. Component2 is installed after Component1 and this works fine.
helm install --debug --name <release-name> .
I am having issues with the helm delete --purge <release-name>
this release. I need to ensure that component2 is deleted before component1 else the pods of component2 go into CrashLoopBackOff state looking for the service of component1.
I tried writing a pre-delete hook to set weights. I am not sure if this is the right approach, but it didn't work for me.
The solution to the above issue was resolved by adding '.spec.podManagementPolicy' in the stateful set. To resolve the issue that I faced, set the podManagementPolicy to 'Parallel'
[Reference][1]: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#pod-management-policy