Skip to content

Update calicoctl reference docs for the cobra migration#2878

Open
caseydavenport wants to merge 4 commits into
tigera:mainfrom
caseydavenport:casey-calicoctl-cobra-help
Open

Update calicoctl reference docs for the cobra migration#2878
caseydavenport wants to merge 4 commits into
tigera:mainfrom
caseydavenport:casey-calicoctl-cobra-help

Conversation

@caseydavenport

@caseydavenport caseydavenport commented Jul 23, 2026

Copy link
Copy Markdown
Member

calicoctl moved from docopt to cobra (projectcalico/calico#12624), so the standalone binary now prints stock cobra --help output. The reference pages still showed the old docopt-style help blocks, so this swaps in the real cobra output (captured by building calicoctl from master) and converts the docopt-style flag sub-sections to cobra syntax to match.

The help blocks also include the per-command descriptions and usage examples added in projectcalico/calico#13302. This should land after that merges (and after calicoctl is rebuilt from master), so the captured output stays in sync.

Also removes the convert command docs - that command was removed from the CLI, so it's gone from both the Next docs and 3.32.

The cobra migration is master-only (3.32 still uses docopt), so the help-block updates here only touch the Next docs. The convert removal applies to both.

Stacked on #2877, which adds the datastore migrate-policy-names reference page that this PR then converts along with everything else. Merge #2877 first - the diff here will clean up once it lands.

CORE-13178

None

Documents the new command for the Next and v3.32 docs. OSS only for now,
since the command has not merged to Calico Enterprise yet.
Matches the CLI wording clarification (calicoctl now says it drops the
legacy "default." tier prefix).
calicoctl moved from docopt to cobra, so the reference pages were showing
stale docopt-style --help output. Swap in the real cobra output, and drop
the convert command docs since that command no longer exists.
@caseydavenport
caseydavenport requested a review from a team as a code owner July 23, 2026 16:17
Copilot AI review requested due to automatic review settings July 23, 2026 16:17
@netlify

netlify Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploy Preview for calico-docs-preview-next ready!

Name Link
🔨 Latest commit d5777ce
🔍 Latest deploy log https://app.netlify.com/projects/calico-docs-preview-next/deploys/6a6244fcbca93700096821a4
😎 Deploy Preview https://deploy-preview-2878--calico-docs-preview-next.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.

@netlify

netlify Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploy Preview for tigera failed. Why did it fail? →

Built without sensitive environment variables

Name Link
🔨 Latest commit d5777ce
🔍 Latest deploy log https://app.netlify.com/projects/tigera/deploys/6a6244fcc2584d00095f9e8c

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

Updates Calico Open Source documentation to reflect calicoctl’s migration from docopt to Cobra, ensuring the “Next” reference pages match the current --help output, and removes documentation for the retired convert command (including in v3.32 docs).

Changes:

  • Replace docopt-style help blocks with Cobra --help output across many “Next” calicoctl reference pages.
  • Remove calicoctl convert reference docs and navigation entries (Next + v3.32).
  • Add and wire up calicoctl datastore migrate-policy-names reference docs and sidebar entries (Next + v3.32).

Reviewed changes

Copilot reviewed 48 out of 48 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sidebars-calico.js Removes convert from Next sidebar; adds migrate-policy-names entry.
calico/reference/index.mdx Removes convert DocCardLink from Next reference index.
calico/reference/calicoctl/version.mdx Updates Next version --help block to Cobra output.
calico/reference/calicoctl/validate.mdx Updates Next validate --help block and options to Cobra format.
calico/reference/calicoctl/replace.mdx Updates Next replace --help block and options to Cobra format.
calico/reference/calicoctl/patch.mdx Updates Next patch --help block and options to Cobra format.
calico/reference/calicoctl/overview.mdx Updates Next top-level calicoctl --help output and removes convert from list.
calico/reference/calicoctl/node/status.mdx Updates Next node status --help block to Cobra output.
calico/reference/calicoctl/node/run.mdx Updates Next node run --help block and options to Cobra output.
calico/reference/calicoctl/node/overview.mdx Updates Next node --help block to Cobra output.
calico/reference/calicoctl/node/diags.mdx Updates Next node diags --help block and options to Cobra output.
calico/reference/calicoctl/node/checksystem.mdx Updates Next node checksystem --help block to Cobra output.
calico/reference/calicoctl/label.mdx Updates Next label --help block and options to Cobra output.
calico/reference/calicoctl/ipam/split.mdx Updates Next ipam split --help block and options to Cobra output.
calico/reference/calicoctl/ipam/show.mdx Updates Next ipam show --help block and options to Cobra output.
calico/reference/calicoctl/ipam/release.mdx Updates Next ipam release --help block and options to Cobra output.
calico/reference/calicoctl/ipam/overview.mdx Updates Next ipam --help output and command list to Cobra format.
calico/reference/calicoctl/ipam/configure.mdx Updates Next ipam configure --help block and options to Cobra output.
calico/reference/calicoctl/ipam/check.mdx Updates Next ipam check --help block to Cobra output.
calico/reference/calicoctl/get.mdx Updates Next get --help block and options to Cobra output.
calico/reference/calicoctl/delete.mdx Updates Next delete --help block and options to Cobra output.
calico/reference/calicoctl/datastore/overview.mdx Updates Next datastore --help block; adds migrate-policy-names listing/link.
calico/reference/calicoctl/datastore/migrate/unlock.mdx Updates Next migrate unlock --help block to Cobra output.
calico/reference/calicoctl/datastore/migrate/overview.mdx Updates Next datastore migrate --help block to Cobra output.
calico/reference/calicoctl/datastore/migrate/lock.mdx Updates Next migrate lock --help block to Cobra output.
calico/reference/calicoctl/datastore/migrate/import.mdx Updates Next migrate import --help block to Cobra output.
calico/reference/calicoctl/datastore/migrate/export.mdx Updates Next migrate export --help block to Cobra output.
calico/reference/calicoctl/datastore/migrate-policy-names.mdx Adds Next reference page for datastore migrate-policy-names (Cobra output + examples).
calico/reference/calicoctl/create.mdx Updates Next create --help block and options to Cobra output.
calico/reference/calicoctl/convert.mdx Removes Next convert reference page.
calico/reference/calicoctl/cluster/overview.mdx Updates Next cluster --help block to Cobra output.
calico/reference/calicoctl/cluster/diags.mdx Updates Next cluster diags --help block and options to Cobra output.
calico/reference/calicoctl/apply.mdx Updates Next apply --help block and options to Cobra output.
calico/operations/native-v3-crds.mdx Removes Next ops doc reference to calicoctl convert.
calico/operations/install-apiserver.mdx Removes Next ops doc reference to calicoctl convert.
calico/operations/calicoctl/configure/overview.mdx Removes Next ops doc reference to calicoctl convert.
calico/operations/calicoctl/configure/kdd.mdx Removes Next ops doc reference to calicoctl convert.
calico/operations/calicoctl/configure/etcd.mdx Removes Next ops doc reference to calicoctl convert.
calico_versioned_sidebars/version-3.32-sidebars.json Removes convert from v3.32 sidebar; adds migrate-policy-names.
calico_versioned_docs/version-3.32/reference/index.mdx Removes convert DocCardLink from v3.32 reference index.
calico_versioned_docs/version-3.32/reference/calicoctl/datastore/overview.mdx Updates v3.32 datastore overview to mention/link migrate-policy-names.
calico_versioned_docs/version-3.32/reference/calicoctl/datastore/migrate-policy-names.mdx Adds v3.32 reference page for datastore migrate-policy-names (docopt-style help + examples).
calico_versioned_docs/version-3.32/reference/calicoctl/convert.mdx Removes v3.32 convert reference page.
calico_versioned_docs/version-3.32/operations/native-v3-crds.mdx Removes v3.32 ops doc reference to calicoctl convert.
calico_versioned_docs/version-3.32/operations/install-apiserver.mdx Removes v3.32 ops doc reference to calicoctl convert.
calico_versioned_docs/version-3.32/operations/calicoctl/configure/overview.mdx Removes v3.32 ops doc reference to calicoctl convert.
calico_versioned_docs/version-3.32/operations/calicoctl/configure/kdd.mdx Removes v3.32 ops doc reference to calicoctl convert.
calico_versioned_docs/version-3.32/operations/calicoctl/configure/etcd.mdx Removes v3.32 ops doc reference to calicoctl convert.

# calicoctl datastore migrate unlock

This sections describes the `calicoctl datastore migrate lock` command.
This sections describes the `calicoctl datastore migrate unlock` command.
Comment on lines 28 to 31
<DocCardLink docId='reference/calicoctl/cluster/overview' />
<DocCardLink docId='reference/calicoctl/cluster/diags' />
<DocCardLink docId='reference/calicoctl/convert' />
<DocCardLink docId='reference/calicoctl/ipam/overview' />
<DocCardLink docId='reference/calicoctl/ipam/check' />
Regenerated from the enriched cobra help output.
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.

2 participants