Skip to content

fix(deploy): make deploy adopts helm releases the state lost - #24

Merged
Vnntnn merged 1 commit into
mainfrom
fix/bootstrap-adopt-helm
Oct 26, 2026
Merged

Vnntnn merged 1 commit into
mainfrom
fix/bootstrap-adopt-helm

Conversation

@Vnntnn

@Vnntnn Vnntnn commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Seen on 2026-10-26: after Start Lab the state had lost the ingress-nginx and metrics-server Helm releases (the cluster still had them), so `make deploy` died on `cannot re-use a name that is still in use` and I had to `terraform import` both by hand.

  • `adopt_helm_releases()` (scripts/lib.sh): for each release, if the cluster has it (`helm status`) and the state does not (`terraform state list`), `terraform import` it. Never imports twice, never a missing release.
  • bootstrap.sh step 6, only when the platform is live: refresh the kubeconfig, adopt, then apply.
  • scripts/lib.test.sh: 4 cases (state lacks one, cluster has one, state has both, empty cluster). CI already runs lib.test.sh.

Not exercised against AWS (the import itself is the same command I ran by hand).

🤖 Generated with Claude Code

After an interrupted run the cluster can hold ingress-nginx / metrics-server that Terraform's state forgot, and the next apply fails with
'cannot re-use a name that is still in use'. On a live platform bootstrap.sh now refreshes the kubeconfig and imports each release the
cluster has and the state lacks before the apply. adopt_helm_releases() in lib.sh, four cases in lib.test.sh (CI runs it).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Vnntnn
Vnntnn merged commit 87fef0c into main Oct 26, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant