v0.12.21
https://github.com/ironPeakServices/infrastructure/tree/master/modules/helm
https://github.com/ironPeakServices/infrastructure/runs/471718289?check_suite_focus=true
successful terraform apply
Error: cannot re-use a name that is still in use
on modules/helm/istio.tf line 9, in resource "helm_release" "istio_init":
9: resource "helm_release" "istio_init" {
terraform apply in CI/CD of https://github.com/ironPeakServices/infrastructuren/a
I bumped into the error after cancelling a previous run (the cloud provider stack on fulfilling a PVC request). That left some orphan resources (svc,cm,sa,...), after deleting them I could re-run the apply just fine.
@hazcod did you manage to solve this? I'm running into the same issue
@aqabawe not really :-(
I had the same problem, and after exploring all kinds of resources in k8s, I found a secret "sh.helm.release.v1.spa-demo.v1" that had been left behind after a partial deployment of my app "spa-demo" with a crashing container.
I had to examine every resource I could think of to look for left behind resources from the failed deploy and remove them manually.鈥疐ound most of them quickly, but the secret was easy to miss and also the service account.
workaround is definitely as stated in previous comment:
search and delete all related helm resource by name: secrets, services, deployments, etc.
Same here... I started with helm list and then tried to find objects... Remember to use the appropriate namespace...
$ helm list -n kube-system
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
$ kubectl get deployments -n kube-system
NAME READY UP-TO-DATE AVAILABLE AGE
coredns 2/2 2 2 92m
external-dns 0/1 1 0 3m47s
$ kubectl delete deployment -n kube-system external-dns
deployment.apps "external-dns" deleted
$ kubectl -n kube-system get secrets | grep helm
sh.helm.release.v1.external-dns.v1 helm.sh/release.v1 1 2m54s
$ kubectl delete secret sh.helm.release.v1.external-dns.v1 -n kube-system
secret "sh.helm.release.v1.external-dns.v1" deleted
terraform applyThe possible solution to import that existing release to terraform state $ terraform import helm_release.example default/example-name.
https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release#import
Most helpful comment
I had the same problem, and after exploring all kinds of resources in k8s, I found a secret "sh.helm.release.v1.spa-demo.v1" that had been left behind after a partial deployment of my app "spa-demo" with a crashing container.
I had to examine every resource I could think of to look for left behind resources from the failed deploy and remove them manually.鈥疐ound most of them quickly, but the secret was easy to miss and also the service account.