Skip to content

[Backport release-1.6] fix(kubernetes): break bootstrap-token Job out of Helm hook to unblock fresh installs - #4541

Merged
myasnikovdaniil merged 1 commit into
release-1.6from
backport/3887-bootstrap-token-release-1.6
Oct 16, 2026
Merged

myasnikovdaniil merged 1 commit into
release-1.6from
backport/3887-bootstrap-token-release-1.6

Conversation

@IvanHunters

Copy link
Copy Markdown
Collaborator

What this PR does

Backports #3887 to release-1.6. The fix reached main only: v1.6.3 and v1.6.4 both still ship the bootstrap-token Job as a post-install,post-upgrade Helm hook, and git tag --contains on the merge commit returns v1.7.0-alpha.1 and nothing from the 1.6 line. Tracked as #4539.

#3875 describes the deadlock this removes: the chart upgrade waits for MachineDeployment and the child HelmReleases, workers cannot register without the bootstrap-token-<id> Secret in the guest cluster, and the hook that creates that Secret only runs once the wait has already succeeded. The wait cannot succeed without nodes, so the upgrade times out and Flux retries the same cycle indefinitely.

It is deterministic rather than flaky, and it takes out every tenant Kubernetes cluster on the platform at once. What makes the backport worth filing separately: anyone hitting this on 1.6.3 finds #3875 closed in the tracker, upgrades to 1.6.4 expecting the fix, and lands in exactly the same state.

Observed on a production cluster before the manual workaround: machines stuck in Provisioned with no NODENAME, VMIs Running with IPs assigned, guest clusters reporting No resources found for nodes, and no bootstrap-token Secret anywhere in the guest kube-system. Creating the Secret by hand brought nodes up within 90 seconds on each affected tenant.

git cherry-pick --mainline 1 of the merge commit applied cleanly with no conflicts, and nothing was changed on top: the diff here is identical to what merged on main.

Validation, helm unittest in packages/apps/kubernetes including tests/talos_templates_test.yaml which this change extends:

Charts:      1 passed, 1 total
Test Suites: 19 passed, 19 total
Tests:       189 passed, 189 total

Screenshots

Not applicable, no UI changes.

Downstream repositories

Release note

fix(kubernetes): create the tenant bootstrap-token Secret outside the Helm hook, so Talos workers can register during a chart upgrade instead of deadlocking against the wait that needs them

…k fresh installs

Backport of #3887 to release-1.6. The fix reached main only, so every 1.6 release still ships the Job as a post-install/post-upgrade hook and hits the deadlock #3875 describes: the chart upgrade waits for MachineDeployment and the child HelmReleases, workers cannot register without the bootstrap-token Secret, and the hook that creates that Secret only runs once the wait has already succeeded. The wait cannot succeed without nodes, so the upgrade times out and Flux retries the same cycle indefinitely.

This is deterministic rather than flaky, and it takes out every tenant Kubernetes cluster on the platform at once. Anyone reading the tracker finds #3875 closed, upgrades to 1.6.4 expecting the fix, and lands in the same state, which is why this backport matters more than the usual one.

(cherry picked from commit adc9c56)

Assisted-by: LLM
Signed-off-by: IvanHunters <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: cozystack/cozystack/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f8b8e3a6-6369-4367-a8b7-7319e059d0cc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added area/kubernetes Issues or PRs related to the tenant Kubernetes app area/release Issues or PRs related to release tooling (changelog, backport, release pipeline) kind/bug Categorizes issue or PR as related to a bug size/L This PR changes 100-499 lines, ignoring generated files labels Sep 28, 2026
@IvanHunters
IvanHunters marked this pull request as ready for review October 6, 2026 19:13
@myasnikovdaniil
myasnikovdaniil merged commit 2b90e8c into release-1.6 Oct 16, 2026
20 of 22 checks passed
@myasnikovdaniil
myasnikovdaniil deleted the backport/3887-bootstrap-token-release-1.6 branch October 16, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/kubernetes Issues or PRs related to the tenant Kubernetes app area/release Issues or PRs related to release tooling (changelog, backport, release pipeline) kind/bug Categorizes issue or PR as related to a bug size/L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants