Skip to content

fix: make --insecure reachable for talosctl meta subcommands - #14347

Merged
talos-bot merged 1 commit into
siderolabs:mainfrom
lexfrei:fix/talosctl-meta-insecure
Sep 11, 2026
Merged

talos-bot merged 1 commit into
siderolabs:mainfrom
lexfrei:fix/talosctl-meta-insecure

Conversation

@lexfrei

@lexfrei lexfrei commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Pull Request

What? (description)

InsecureFlags gets an AddPersistentFlags, and talosctl meta switches to it, so meta write and meta delete see --insecure and --cert-fingerprint again. Tests cover parsing both flags on the two subcommands, plus a walk over the command tree that fails if a command which runs nothing carries --insecure as a local flag.

Why? (reasoning)

Fixes #14346

Since v1.14.0 talosctl meta write --insecure fails with unknown flag: --insecure. #13500 replaced metaCmd.PersistentFlags() with InsecureFlags.AddFlags(metaCmd), and that one registers in the local flag set. Cobra merges a parent's persistent flags into a child, not its local ones, and metaCmd is Args: cobra.NoArgs with no RunE, so the flag had nowhere to land. talosctl meta --help still listed it.

Writing a META key goes over the maintenance service, before a machine config exists, so there is no other route to that operation.

wipe registers the mix-in on the subcommands that run and works. Persistent flags on the parent keep both meta write --insecure and meta --insecure write working, the same as v1.13.7.

Acceptance

Please use the following checklist:

  • you linked an issue (if applicable)
  • you included tests (if applicable)
  • you ran conformance (make conformance)
  • you formatted your code (make fmt)
  • you linted your code (make lint)
  • you generated documentation (make docs)
  • you ran unit-tests (make unit-tests)

Conform passes everything except the GPG identity check, which wants the signing key to belong to a siderolabs org member. The CLI reference was regenerated with the same generator the docs target runs, and it reproduces the committed file byte for byte on a clean tree.

See make help for a description of the available targets.

@github-project-automation github-project-automation Bot moved this to To Do in Planning Sep 11, 2026
@talos-bot talos-bot moved this from To Do to In Review in Planning Sep 11, 2026
@smira smira self-assigned this Sep 11, 2026

@smira smira left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thank you, I will remove the tests as they are overly complex for a simple issue here

@github-project-automation github-project-automation Bot moved this from In Review to Approved in Planning Sep 11, 2026
`talosctl meta` groups write and delete and runs nothing itself, so its
maintenance-service flags have to be persistent: cobra merges a parent's
persistent flags into its subcommands, but not its local ones. Registered
locally, --insecure was listed in `talosctl meta --help` while every
invocation of it failed with "unknown flag: --insecure".

Writing a META key happens before a machine config exists, so the
maintenance service is the only route to that operation.

Signed-off-by: Aleksei Sviridkin <[email protected]>
Signed-off-by: Andrey Smirnov <[email protected]>
@smira

smira commented Sep 11, 2026

Copy link
Copy Markdown
Member

/m

@talos-bot
talos-bot merged commit 4327e10 into siderolabs:main Sep 11, 2026
71 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Done in Planning Sep 11, 2026
@smira smira moved this from Proposed to Accepted in Backports to v1.14 Sep 14, 2026
@smira smira moved this from Accepted to In Progress in Backports to v1.14 Sep 14, 2026
@smira smira mentioned this pull request Sep 14, 2026
@smira smira moved this from In Progress to Backported in Backports to v1.14 Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Backported
Archived in project

Development

Successfully merging this pull request may close these issues.

talosctl meta: --insecure is unreachable since v1.14.0

3 participants