Skip to content

docs: add Use the ADP CLI section with GitOps how-to#112

Merged
micheleRP merged 4 commits into
redpanda-data:mainfrom
birdayz:jb/adp-docs-cli-gitops
Jun 29, 2026
Merged

docs: add Use the ADP CLI section with GitOps how-to#112
micheleRP merged 4 commits into
redpanda-data:mainfrom
birdayz:jb/adp-docs-cli-gitops

Conversation

@birdayz

@birdayz birdayz commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What

Add a top-level Use the ADP CLI section (beta) with two pages, wire them into the nav, and bring every rpk ai mention in the docs in line with the self-contained CLI auth model:

  • Use the ADP CLI (modules/cli/pages/index.adoc) — what rpk ai is, how to install it, how to sign in and select an ADP environment, the resource command surface, and output formats.
  • Manage Resources with GitOps (modules/cli/pages/gitops.adoc) — the rpk ai <resource> apply/diff workflow.

It also corrects the existing gateway:connect-agent.adoc rpk ai walkthrough and the stray "authentication is owned by rpk cloud login" claims in the gateway overview, the rpk reference index, and the Connect test-tools/create-server pages.

Why

The rpk ai CLI can manage every ADP resource declaratively from YAML manifests, but the docs only shipped the autogenerated command reference. Operators automating ADP in Git and CI had no guide for the apply/diff workflow, its reconcile semantics, or drift gating. GitOps is a first-class CLI workflow and belongs in a guide section distinct from the command reference.

cloudv2 PR #27510 also changed how the CLI authenticates. rpk ai is now self-contained: it signs in with its own OAuth device flow (rpk ai auth login) and selects an ADP environment (rpk ai env), independent of the rpk cloud session. The docs described the old coupling ("reuses the rpk cloud login token") and a non-existent RPAI_ENDPOINT env override, both of which are now wrong.

Implementation details

New module modules/cli, both pages marked :page-beta: because the ADP CLI and GitOps are beta.

  • The overview page covers install (rpk ai install) and connect: rpk ai auth login runs the device flow and caches credentials in ~/.rpai/credentials, then rpk ai env list/use/show selects an ADP environment whose AI Gateway becomes the active target. --rpai-endpoint is the one-off endpoint override; it is deliberately not bound to an environment variable.
  • The GitOps page documents the reconcile semantics straight from the engine: presence-based update mask (omitted fields untouched), lists/maps/oneof variants replace wholesale, create-only fields immutable, secrets stay by reference, no prune, and diff exits non-zero on drift for CI gating. It covers llm, mcp, oauth, oauth-client, and agent, with an exported manifest example, a worked apply/diff cycle, and troubleshooting.
  • Connection-target wording moves from "cluster" to "ADP environment" to match the new primitive. The example AI Gateway URL hostnames (which legitimately carry a cluster ID) are unchanged.
  • connect-agent.adoc, gateway/overview.adoc, reference/rpk/index.adoc, connect/test-tools.adoc, and connect/create-server.adoc drop the rpk cloud login coupling and point at rpk ai auth login.
  • nav.adoc: the section sits between Routing & LLM Settings and Reference.

Preview pages

  • Use the ADP CLI (entry point for the new section; GitOps and the corrected gateway/connect pages are reachable from the nav)

References

The rpk ai CLI can manage every ADP resource declaratively from YAML
manifests, but the docs only shipped the autogenerated command
reference. Operators automating ADP in Git and CI had no guide for the
apply/diff workflow, its reconcile semantics, or drift gating.

Add a top-level "Use the ADP CLI" section (beta) with two pages:

- index.adoc: what rpk ai is, install, connect (reuses rpk cloud login
  and the active profile), the resource command surface, and output
  formats. Links to the existing connect-agent setup walkthrough rather
  than duplicating it.
- gitops.adoc: export with get -o yaml, preview with diff, reconcile
  with apply, directory/stdin/multi-document inputs, CI drift gating,
  the declarative omitted-means-zero caveat, and troubleshooting. Covers
  llm, mcp, oauth, oauth-client, and agent.

Wire both into the nav between Routing & LLM Settings and Reference.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Jun 26, 2026

Copy link
Copy Markdown

👷 Deploy request for redpanda-agentic-data-plane pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit cdb20bd

rpai no longer rides the rpk cloud session. It signs in with its own
device-flow login and selects an ADP environment, not a streaming
cluster. The docs still described the old coupling everywhere rpk ai
was mentioned.

Rewrite the CLI overview connect section and the connect-agent rpk ai
walkthrough around `rpk ai auth login` and `rpk ai env`, drop the false
RPAI_ENDPOINT env override (the only endpoint override is the
--rpai-endpoint flag, deliberately not env-bound), and move the GitOps
page's connection-target wording from "cluster" to "environment". Fix
the same stale "authentication is owned by rpk cloud login" claim in the
rpk reference index, the gateway overview, and the Connect
test-tools/create-server pages.

Tracks cloudv2 PR #27510.
@birdayz

birdayz commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

@micheleRP this is now ready for review

- gitops: convert the reconcile-outcomes list to a description list and trim the page description under the 155-char limit
- cli overview: set page-topic-type to how-to to match its procedural content and skill-level learning objectives
- align "independent of any rpk cloud session" phrasing across the cli, connect-agent, and rpk reference pages
- refresh the cli index source comment to origin/main (cloudv2 PR #27510 merged)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@micheleRP micheleRP 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.

thank you @birdayz!

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