Skip to content

fix(clustertool): block init in the previous native Talos layout - #683

Merged
Boemeltrein merged 1 commit into
codex/single-cluster-structurefrom
codex/legacy-layout-check
Nov 4, 2026
Merged

Boemeltrein merged 1 commit into
codex/single-cluster-structurefrom
codex/legacy-layout-check

Conversation

@Boemeltrein

Copy link
Copy Markdown
Member

Description

The initialization guard detects older Talhelper configurations but misses repositories using clusters/main/talos/clustertool.yaml. Running init there could create the new single-cluster layout alongside the existing configuration.

Add this path to the existing guard so initialization stops before decryption or repository generation, including when RUNAGAIN exists. Generalize the error message to cover both legacy layouts. Retain helper.ClusterName and the existing Talhelper checks.

⚙️ Type of change

  • 🆕 New feature (e.g., bootstrap, cluster config, or automation)
  • 🐛 Bugfix (e.g., node setup, config generation)
  • 🔃 Chart Updates/Changes included with clustertool
  • 🔃 Refactor (internal changes, no functional impact)
  • ⚠️ Breaking change (changes Talos cluster behavior)

🧪 How Has This Been Tested?

Passed locally on Windows:

  • go test ./cmd ./pkg/initfiles -count=1

  • Extended CLI subprocess tests verify the new path is rejected with and without RUNAGAIN, before decryption, while preserving the existing configuration file.

  • Existing legacy detection and initialization confirmation tests.

  • git diff --check.

  • Run clustertool commands locally

  • Verified cluster bootstrap on Talos nodes

  • Checked generated configs are valid

  • Validated cluster state after changes

📃 Notes:

Targets codex/single-cluster-structure.

This change detects the previous layout; it does not migrate existing repositories. No live cluster operations were performed.

🤖 This PR is AI generated.

✔️ Checklist:

  • ⚖️ Followed project style and contribution guidelines
  • 👀 Self-reviewed my changes
  • 🧪 Documented testing steps
  • 🏷️ PR title follows convention:
    • feat(clustertool):
    • fix(clustertool):
    • chore(clustertool):

@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown

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
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 77831468-46b9-49a6-91b0-530779b025d4

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@trueforge-bot

trueforge-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown

🚀 HelmRelease CI Report

Overall Status

Stage Result
🔍 Detect HelmReleases success
🧪 Helm Tests skipped

🧪 HelmReleases Tested


⏭️ HelmReleases Skipped


Result

ℹ️ No HelmReleases required testing

@Boemeltrein
Boemeltrein merged commit 63a9938 into codex/single-cluster-structure Nov 4, 2026
11 checks passed
@Boemeltrein
Boemeltrein deleted the codex/legacy-layout-check branch November 4, 2026 19:03
Boemeltrein added a commit that referenced this pull request Nov 4, 2026
* feat(clustertool)!: remove the cluster selector (#666)

BREAKING CHANGE: ClusterTool no longer accepts the cluster selector and uses clusters/main. Existing initialization safeguards are retained.

* feat(clustertool)!: adopt the single-cluster repository layout (#669)

* feat(clustertool)!: adopt the single-cluster repository layout

* clean up

* apps move into sub folder

* fix: update HelmRelease paths to reflect new directory structure under 'apps'

* fix: simplify resource exclusion logic in kustomization.yaml processing

* refactor: replace ioutil with os package for file operations in kustomizations.go

* delete: remove repository_layout_test.go file

* feat(clustertool)!: read the Talos cluster name from configuration (#676)

* feat(clustertool)!: read the Talos cluster name from configuration

* feat(clustertool): rename file multinode to generate

* idem

* fix(clustertool): detect the previous native Talos layout during init (#683)

* fix(clustertool): set namespaces on Flux Kustomizations (#684)

* fix(clustertool): exclude age secret from generated Flux resources

* fix(clustertool): exclude age secret from generated Flux resources (#686)

* zucht
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