Skip to content

feat(clustertool): streamline configuration commands and confirm repeated init - #501

Merged
alfi0812 merged 9 commits into
trueforge-org:mainfrom
Boemeltrein:genconfig_changes
Sep 20, 2026
Merged

alfi0812 merged 9 commits into
trueforge-org:mainfrom
Boemeltrein:genconfig_changes

Conversation

@Boemeltrein

Copy link
Copy Markdown
Member

Description

Separate configuration generation from optional repository maintenance and protect existing clusters from accidental initialization.

Configuration generation

Remove Flux placeholder rendering and Kustomization generation from genconfig, including when invoked by talos apply. Init retains these steps.

Add clustertool genks (alias kustomizations) for optional Kustomization generation, with --cluster support. Existing ks.yaml files are preserved.

Git hooks

Add clustertool githook to reinstall the pre-commit hook for the current environment. Init and genconfig now propagate hook installation errors, including write and close failures.

Remove the go.mod exception so all repositories use the precommit binary. Missing or failing binaries continue to block commits.

Initialization

Block init for legacy Talhelper configurations before decryption. Warn before repeating an already completed initialization, using the same confirmation behavior as Flux bootstrap.

Keep RUNAGAIN until all init steps succeed, allowing failed setup to be retried. Recommend initializing in a new folder and comparing files with the existing configuration.

Documentation

Update HOW_TO and the command list for the new commands and initialization behavior.

⚒️ Fixes #

⚙️ 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?

Automated checks

Relevant package tests passed with Go 1.26.5: cmd, helper, initfiles, gencmd and fluxhandler. Coverage includes confirmation behavior, legacy detection, retry-marker retention, hook errors and Git for Windows commit blocking. git diff --check passed.

Manual verification

Verified init, genconfig, genks, githook and talos apply on a test cluster. Confirmed legacy blocking, repeated-init confirmation, failed-init recovery, Kustomization generation, secret encryption and commit blocking on encryption failure.

  • Run clustertool commands locally
  • Verified cluster bootstrap on Talos nodes
  • Checked generated configs are valid
  • Validated cluster state after changes

📃 Notes:

After init, maintain Kustomizations manually or run genks.
Run githook after switching environments or rebuilding a devcontainer.
Legacy clusters require a new folder; no migration is performed.

✔️ Checklist:

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

Please don't blindly check all the boxes. Read them and only check those that apply.
Those checkboxes are there for the reviewer to see what is this all about and
the status of this PR with a quick glance.

@Boemeltrein
Boemeltrein marked this pull request as ready for review September 20, 2026 11:36
@alfi0812
alfi0812 merged commit 76c5284 into trueforge-org:main Sep 20, 2026
9 of 10 checks passed
@Boemeltrein
Boemeltrein deleted the genconfig_changes branch September 20, 2026 12:07
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