Repository navigation
feat(clustertool): streamline configuration commands and confirm repeated init - #501
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 bytalos apply. Init retains these steps.Add
clustertool genks(aliaskustomizations) for optional Kustomization generation, with--clustersupport. Existingks.yamlfiles are preserved.Git hooks
Add
clustertool githookto 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.modexception 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
RUNAGAINuntil 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
🧪 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 --checkpassed.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.
📃 Notes:
After init, maintain Kustomizations manually or run
genks.Run
githookafter switching environments or rebuilding a devcontainer.Legacy clusters require a new folder; no migration is performed.
✔️ Checklist:
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.