Skip to content

docs(talm): expand init reference with flag matrix + update + encrypt/decrypt#537

Open
lexfrei wants to merge 3 commits into
cozystack:mainfrom
lexfrei:feat/talm-init-docs-expand
Open

docs(talm): expand init reference with flag matrix + update + encrypt/decrypt#537
lexfrei wants to merge 3 commits into
cozystack:mainfrom
lexfrei:feat/talm-init-docs-expand

Conversation

@lexfrei
Copy link
Copy Markdown
Contributor

@lexfrei lexfrei commented May 13, 2026

What

Expand section 2.1 "Initialize Configuration" of the talm install guide (/docs/v1.3 and /docs/next) with the missing operator-facing detail that has been driving questions on the support channel:

  • Project layout: now lists secrets.encrypted.yaml, talosconfig.encrypted, and talm.key (the previous list mentioned only secrets.yaml, leaving operators unsure why the project also ships encrypted counterparts and a key file).
  • Available presets: names the two embedded presets (cozystack, talm) so operators stop guessing the --preset argument.
  • Flag reference grouped by mode (new project / update / encrypt / decrypt) with exact short and long forms.
  • "Updating to a newer talm release" subsection covering interactive vs --force (CI) invocations of talm init --update.
  • "Encrypt / decrypt round-trip" subsection with a note about backing up talm.key out-of-band.

Why

The current section is a single quick-start example and a directory listing. Operators reading the guide do not know which flags talm init supports beyond --preset / --name, how --update interacts with their customisations, or how the encrypt / decrypt round-trip works. talm init -h lists the flags but doesn't explain semantics or which preset names are valid.

Source-of-truth for flags: cozystack/talm pkg/commands/init.go on main. Preset list: cozystack/talm pkg/generated/embed.go.

Where

  • content/en/docs/v1.3/install/kubernetes/talm.md (current stable)
  • content/en/docs/next/install/kubernetes/talm.md (unreleased)

Older versions (v0 / v1.0 / v1.1 / v1.2) are historical snapshots and intentionally left untouched.

Summary by CodeRabbit

  • Documentation
    • Expanded Talm initialization docs with details on encrypted outputs and key backup/management
    • Added an “Available Presets” section and a grouped flag reference for init/update/encrypt-decrypt workflows
    • Included examples for refreshing preset-supplied charts and an encrypt/decrypt round trip
    • Updated node generation guidance to use the --nodes flag and to create a nodes directory

Review Change Stack

…/decrypt

The talm.md install guide had a single quick-start example for
'talm init' and no flag reference. Operators following the guide
landed on the support channel asking which flags are available,
how '--update' interacts with their customisations, and how the
'--encrypt' / '--decrypt' round-trip works — answers that are not
discoverable from the page today.

Expand section 2.1 with:

  - Project layout: call out 'secrets.encrypted.yaml',
    'talosconfig.encrypted', and 'talm.key' (the previous list
    only mentioned 'secrets.yaml').
  - Available presets: name the two embedded presets ('cozystack',
    'talm') so operators stop guessing the --preset argument.
  - Flag reference grouped by mode (new project / update / encrypt
    / decrypt) with the exact short and long forms, defaults, and
    interactions between flags (--force semantics differ between
    new-project and --update).
  - Updating-to-a-newer-talm-release subsection covering the two
    common --update invocations (interactive vs --force CI).
  - Encrypt / decrypt round-trip with a sentence about backing up
    'talm.key' out-of-band.

Applied to both /docs/v1.3 (current stable) and /docs/next
(unreleased), mirroring the existing cross-version structure.

Signed-off-by: Aleksei Sviridkin <f@lex.la>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 13, 2026

Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit aafcdc3
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/6a05ba38e48005000866a2ee
😎 Deploy Preview https://deploy-preview-537--cozystack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

Warning

Rate limit exceeded

@lexfrei has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 50 minutes and 38 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ed87c246-5623-401e-9ad5-505639eca7dc

📥 Commits

Reviewing files that changed from the base of the PR and between a8a01f9 and aafcdc3.

📒 Files selected for processing (2)
  • content/en/docs/next/install/kubernetes/talm.md
  • content/en/docs/v1.3/install/kubernetes/talm.md
📝 Walkthrough

Walkthrough

This PR expands Talm initialization documentation in both the next and v1.3 versions of the installation guide, replacing brief project-structure notes with comprehensive sections covering encrypted file generation, embedded preset selection, a grouped talm init flag reference, and example workflows for release updates and encrypt/decrypt operations.

Changes

Talm Init Documentation Expansion

Layer / File(s) Summary
Project Structure and Encrypted Artifacts
content/en/docs/next/install/kubernetes/talm.md, content/en/docs/v1.3/install/kubernetes/talm.md
Expanded project-structure documentation with encrypted file names (secrets.encrypted.yaml, talosconfig.encrypted), explanation of the local talm.key file, and the optional nodes directory.
Available Presets Reference
content/en/docs/next/install/kubernetes/talm.md, content/en/docs/v1.3/install/kubernetes/talm.md
New subsections documenting the embedded talm and cozystack presets and how users select presets via the -p/--preset flag during initialization.
Talm Init Command Flags
content/en/docs/next/install/kubernetes/talm.md, content/en/docs/v1.3/install/kubernetes/talm.md
Grouped flag reference covering project creation flags, existing-project update flags (--update, --force), and encryption-management flags (--encrypt, --decrypt) with their prerequisites and behavior.
Initialization Workflows and Examples
content/en/docs/next/install/kubernetes/talm.md, content/en/docs/v1.3/install/kubernetes/talm.md
Example commands for updating projects to newer Talm releases and performing encrypt/decrypt round-trip operations, with documentation of the critical dependency on preserving talm.key.
Node Template Commands
content/en/docs/next/install/kubernetes/talm.md, content/en/docs/v1.3/install/kubernetes/talm.md
Updated talm template examples to use --nodes (instead of -n) and include mkdir nodes when generating per-node YAML files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰
I found a key beneath a log so small,
Sealed the secrets, tucked them in a shawl,
Presets and flags now lined up neat,
Nodes in folders, tidy and sweet,
Hop, patch, and doc — our setup's complete.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly reflects the main changes: expanding talm init documentation with flag reference, update mode details, and encrypt/decrypt workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@lexfrei lexfrei marked this pull request as ready for review May 13, 2026 09:23
@lexfrei lexfrei requested review from kvaps and lllamnyp as code owners May 13, 2026 09:23
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@lexfrei lexfrei enabled auto-merge May 13, 2026 09:23
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the talm documentation for both the next and v1.3 versions, adding detailed sections for available presets, a talm init flag reference, and instructions for updating releases and managing encrypted secrets. The review feedback suggests improving consistency by including kubeconfig.encrypted in the project layout and command examples, and standardizing the spelling of 'customizations' to US English.

- `Chart.yaml` - a file containing the common information about your project; the name of the chart is used as the name for the newly created cluster.
- `templates` - a directory used to describe templates for the configuration generation.
- `secrets.yaml` - a file containing secrets for your cluster.
- `secrets.encrypted.yaml`, `talosconfig.encrypted` - encrypted counterparts produced from `talm.key` (commit these to git instead of the plaintext files).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The list of encrypted files is missing kubeconfig.encrypted, which is mentioned later in the flag reference (line 131). Including it here ensures the project layout description is complete and consistent.

Suggested change
- `secrets.encrypted.yaml`, `talosconfig.encrypted` - encrypted counterparts produced from `talm.key` (commit these to git instead of the plaintext files).
- `secrets.encrypted.yaml`, `talosconfig.encrypted`, `kubeconfig.encrypted` - encrypted counterparts produced from `talm.key` (commit these to git instead of the plaintext files).

- `-u, --update` - re-extract `charts/talm/` and other preset-shipped files from the talm binary. `--preset` is required; `--name` is not.
- `--force` - auto-accept every preset-template diff (skip the interactive prompt; safe to use in CI).

`--update` rewrites preset-shipped files only; your `values.yaml`, `secrets.yaml`, `templates/`, and `nodes/` customisations are preserved.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The document uses US English spelling (e.g., 'optimized', 'customizable', 'initialize'). 'customisations' should be updated to 'customizations' for consistency.

Suggested change
`--update` rewrites preset-shipped files only; your `values.yaml`, `secrets.yaml`, `templates/`, and `nodes/` customisations are preserved.
`--update` rewrites preset-shipped files only; your `values.yaml`, `secrets.yaml`, `templates/`, and `nodes/` customizations are preserved.

The encrypted copies are what you commit to git; the plaintext copies are what `talm` reads. Use these to round-trip between the two:

```bash
talm init --encrypt # secrets.yaml -> secrets.encrypted.yaml; talosconfig -> talosconfig.encrypted
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment for the encrypt command is missing the kubeconfig mapping, which is described as being handled by the --encrypt flag on line 131.

Suggested change
talm init --encrypt # secrets.yaml -> secrets.encrypted.yaml; talosconfig -> talosconfig.encrypted
talm init --encrypt # secrets.yaml -> secrets.encrypted.yaml; talosconfig -> talosconfig.encrypted; kubeconfig -> kubeconfig.encrypted

- `Chart.yaml` - a file containing the common information about your project; the name of the chart is used as the name for the newly created cluster.
- `templates` - a directory used to describe templates for the configuration generation.
- `secrets.yaml` - a file containing secrets for your cluster.
- `secrets.encrypted.yaml`, `talosconfig.encrypted` - encrypted counterparts produced from `talm.key` (commit these to git instead of the plaintext files).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The list of encrypted files is missing kubeconfig.encrypted, which is mentioned later in the flag reference (line 131). Including it here ensures the project layout description is complete and consistent.

Suggested change
- `secrets.encrypted.yaml`, `talosconfig.encrypted` - encrypted counterparts produced from `talm.key` (commit these to git instead of the plaintext files).
- `secrets.encrypted.yaml`, `talosconfig.encrypted`, `kubeconfig.encrypted` - encrypted counterparts produced from `talm.key` (commit these to git instead of the plaintext files).

- `-u, --update` - re-extract `charts/talm/` and other preset-shipped files from the talm binary. `--preset` is required; `--name` is not.
- `--force` - auto-accept every preset-template diff (skip the interactive prompt; safe to use in CI).

`--update` rewrites preset-shipped files only; your `values.yaml`, `secrets.yaml`, `templates/`, and `nodes/` customisations are preserved.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The document uses US English spelling (e.g., 'optimized', 'customizable', 'initialize'). 'customisations' should be updated to 'customizations' for consistency.

Suggested change
`--update` rewrites preset-shipped files only; your `values.yaml`, `secrets.yaml`, `templates/`, and `nodes/` customisations are preserved.
`--update` rewrites preset-shipped files only; your `values.yaml`, `secrets.yaml`, `templates/`, and `nodes/` customizations are preserved.

The encrypted copies are what you commit to git; the plaintext copies are what `talm` reads. Use these to round-trip between the two:

```bash
talm init --encrypt # secrets.yaml -> secrets.encrypted.yaml; talosconfig -> talosconfig.encrypted
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment for the encrypt command is missing the kubeconfig mapping, which is described as being handled by the --encrypt flag on line 131.

Suggested change
talm init --encrypt # secrets.yaml -> secrets.encrypted.yaml; talosconfig -> talosconfig.encrypted
talm init --encrypt # secrets.yaml -> secrets.encrypted.yaml; talosconfig -> talosconfig.encrypted; kubeconfig -> kubeconfig.encrypted

@lexfrei lexfrei self-assigned this May 13, 2026
lexfrei added 2 commits May 13, 2026 16:16
The talm template example invoked the shorthand -n IP, which is
no longer registered as of cozystack/talm v0.28.0 (PR cozystack#197). Without
this fix the documented bootstrap golden path errors out at parse
time with 'flag -n not defined'. Long form --nodes IP is the
permanent replacement.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Adds coverage for two recently-shipped operator-UX fixes in talm:

- `--cluster-endpoint <url>` flag on `talm init` writes the
  Kubernetes control-plane URL into `values.yaml::endpoint`.
  Includes a new subsection clarifying the two-endpoint
  confusion that drives most support questions:
  `talosconfig.endpoints` (talosctl client routing) vs
  `values.yaml::endpoint` (kube-apiserver URL rendered into
  every node's MachineConfig). Also documents the single-
  endpoint auto-derive heuristic and the late hint when the
  field is left empty.

- `talm init --decrypt` without `talm.key` now surfaces a
  recovery-path hint naming both options (restore from backup,
  re-run `talm init` to regenerate with new secrets). Extended
  the out-of-band backup warning to mention the new hint so
  operators know what to expect when they hit the missing-key
  case.

Both files (`next/` and `v1.3/`) updated for consistency. The
`--cluster-endpoint` flag is acceptable forward-drift in
`v1.3/`: it lands in cozystack via the next talm bump and the
docs stay accurate after rebase.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
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