Skip to content

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

Merged
Boemeltrein merged 3 commits into
codex/single-cluster-structurefrom
codex/cluster-name-config
Nov 4, 2026
Merged

Boemeltrein merged 3 commits into
codex/single-cluster-structurefrom
codex/cluster-name-config

Conversation

@Boemeltrein

Copy link
Copy Markdown
Member

Description

Talos configuration generation currently uses the hardcoded cluster name main. Read the name from a required clusterName field in talos/clustertool.yaml, with main supplied in the template.

Use this value for generated machine configurations and the Talos client context. At startup, display the configured name or <not configured> without requiring a complete, valid inventory.

Remove automatic CLUSTERNAME environment injection. Retain helper.ClusterName with a comment explaining its remaining use in the unchanged legacy layout 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?

Validated locally on Windows:

  • Full Go test suite with TALOSCTL_INTEGRATION=1; reran cmd and pkg/talosconfig tests after the startup logging adjustment.

  • Real local Talos generation with clusterName: homelab, checking the generated cluster name and client context.

  • Rejection of missing, empty and whitespace-only names.

  • Existing apply/bootstrap command tests and legacy initialization checks.

  • info and --help through the CLI test process with configured, missing, empty and malformed configuration; each displayed one startup name message and exited successfully.

  • git diff --check.

  • Run clustertool commands locally

  • Verified cluster bootstrap on Talos nodes

  • Checked generated configs are valid

  • Validated cluster state after changes

📃 Notes:

Configuration files without clusterName must add the field before generation or apply. New installations receive clusterName: main from the template.

No live cluster actions 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 3, 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: 2163ee33-d952-4471-9dde-6ac9023689b8

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 3, 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

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Boemeltrein
Boemeltrein marked this pull request as ready for review November 4, 2026 17:55
@Boemeltrein
Boemeltrein merged commit 67b0343 into codex/single-cluster-structure Nov 4, 2026
10 of 11 checks passed
@Boemeltrein
Boemeltrein deleted the codex/cluster-name-config branch November 4, 2026 17:55
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.

2 participants