Skip to main content

Posts

Showing posts from September, 2020

CI/CD Automation: How to wait for Helm deployment into Kubernetes cluster

 So I created this post because with Helm v3 , if you use --wait option and the timeout is reached and the deployment isn't successful, Helm marks the deployment as failed . The problem is that subsequent deployment (upgrade) that may contain the fix won't work as expected and it will end up in error like this: [some-name] has no deployed release   The only way to fix this is manual intervene and deleting the previous failed release. This is not only scary but also against the automation process. If we remove --wait option, Helm will mark the deployment as successful regardless. My solution to this that works nicely is as per below: Remove --wait option from helm deploy Use this command to retrieve the list of deployment for that namespace that you are deploying against: kubectl get deployments -n ${namespace} -o jsonpath='{range .items[*].metadata}{.name}{","}{end}' You can use split to turn the comma separated list above into an array Then you can run mul