简体   繁体   中英

helm: delete releases in a sequence

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM