Skip to content

Add descriptions and examples to calicoctl command help - #13302

Merged
marvin-tigera merged 2 commits into
projectcalico:masterfrom
caseydavenport:casey-migrate-policy-names-help
Jul 23, 2026
Merged

Add descriptions and examples to calicoctl command help#13302
marvin-tigera merged 2 commits into
projectcalico:masterfrom
caseydavenport:casey-migrate-policy-names-help

Conversation

@caseydavenport

@caseydavenport caseydavenport commented Jul 23, 2026

Copy link
Copy Markdown
Member

The docopt to cobra migration (#12624) dropped the descriptions calicoctl used to print for each command. This adds them back for cobra: every command's --help now shows a short description of what it does and when you'd use it, and the leaf commands include usage examples. The descriptions are deliberately shorter than the old docopt text - purpose first, not a wall of prose.

This is cobra-only, so it doesn't apply to release-v3.32 where calicoctl still uses docopt.

It also clarifies the migrate-policy-names one-line summary, which said it drops "the tier prefix" but only rewrites default-tier policy names. It now names the legacy "default." prefix specifically. That wording fix goes to release-v3.32 separately (#13303).

Companion docs update: tigera/docs#2878.

None

The command only rewrites default-tier policy names, so the one-line
summary now names the legacy "default." prefix specifically, matching
the fuller description the subcommand already prints.
@caseydavenport
caseydavenport requested a review from a team as a code owner July 23, 2026 15:47
Copilot AI review requested due to automatic review settings July 23, 2026 15:47
@caseydavenport caseydavenport added docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact labels Jul 23, 2026
@marvin-tigera marvin-tigera added this to the Calico v3.33.0 milestone Jul 23, 2026

Copilot AI left a comment

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.

Pull request overview

This PR updates calicoctl’s datastore migrate-policy-names one-line help text to more precisely describe what the command actually rewrites (the legacy default. prefix), aligning the short summary with the existing detailed behavior/output.

Changes:

  • Refine migrate-policy-names short help text to explicitly reference the legacy default. tier prefix.

The docopt to cobra migration dropped the per-command description text.
This adds a short Long description to every command explaining what it does
and when to use it, plus usage examples on the leaf commands.
@caseydavenport caseydavenport changed the title Clarify calicoctl datastore migrate-policy-names help text Add descriptions and examples to calicoctl command help Jul 23, 2026
@marvin-tigera
marvin-tigera merged commit 61b3dc4 into projectcalico:master Jul 23, 2026
7 checks passed
@caseydavenport
caseydavenport deleted the casey-migrate-policy-names-help branch July 23, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-not-required Docs not required for this change merge-when-ready release-note-not-required Change has no user-facing impact squash-commits

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants