1

I am developing a Helm chart. When I helm install, I reliably get one of a handful of different errors saying something the chart deploys already exists, e.g.:

Error: secrets "my-secret-name" already exists

If I try again, it fails because the release already exists. If I issue the exact same command but replace install with upgrade (and removing non-applicable options like --create-namespace if applicable), it works. This is so reliable that I've baked it into a shell script to do the install and then the upgrade automatically.

It's usually a particular secret or one of two namespaces. To be clear, I can't recall a time that it wasn't one of those three specific objects, but I've become a bit blind to the error.

I regularly deploy my chart to Kind and GKE clusters; the error happens in both places, even on a brand new cluster with no objects in it, but also if I uninstall and reinstall I can make it happen again. In no case has it ever been correct that the object already exists.

Unfortunately, I'm not able to share my chart's source. Here are some things I can share:

My chart has 5 dependent subcharts. Three of them are third-party (etcd, minio, kube-prometheus-stack); the other two are in-house charts. Every time I have noticed, the objects that already exist belong to a specific one of the in-house subcharts; never something belonging to my own chart.

The subchart is a tarball that I build and import regularly using helm dependency update. Using different methods to build and include it do not seem to make a difference.

I first encountered this with Helm 3.5.2. I upgraded to Helm 3.5.4; the problem remains. I've searched through Helm's open Github issues and come up empty. I've also Googled and found nobody experiencing the same problem.

I'm fairly new to Helm, so this could just be an amateur error on my part. I assume it's a problem with my chart, or more likely the subchart. I know about helm template --debug -- it hasn't helped. The templates themselves have the expected output (as evidenced by the fact that it works fine if I follow up the failed install with an upgrade). I've gone through the Helm docs repeatedly trying to find some option I can enable that would generate more output during the install process so that I might understand the nature of the failure, but I have found nothing.

helm install --debug produces additional output, but nothing relevant to the failure.

I know I haven't provided enough detail for someone else to debug it for me (and I cannot for corporate reasons), so my question is: How can I debug further? If you were facing this problem in your own chart, what would you do to narrow down the problem?

Assume you've pared down the chart and subcharts to a minimal set of templates/etc required to reproduce the problem. There is still no useful output; no indication of how the object indicated in the error "already exists" in a brand new cluster. Now what?

JakeRobb
  • 151
  • 7

0 Answers0