-
Notifications
You must be signed in to change notification settings - Fork 4
How to pass in secrets to cluster config #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to pass in secrets to cluster config #283
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughThe changes update documentation to cover new secret management capabilities in Redpanda Cloud, specifically for cluster configuration scenarios such as Iceberg integration. A new section on managing secrets via the Data Plane API is added, detailing create, update, and delete operations with example requests. The get-started documentation now includes a subsection on managing secrets for cluster configuration, referencing both CLI and API workflows. Additionally, the Antora playbook is updated to source documentation from a different branch, and a metadata attribute is removed from the Iceberg catalog usage guide. Sequence Diagram(s)sequenceDiagram
participant User
participant rpk CLI / API Client
participant Redpanda Cloud Control Plane
participant Secret Store
User->>rpk CLI / API Client: Request to create/update/delete secret
rpk CLI / API Client->>Redpanda Cloud Control Plane: API call to manage secret
Redpanda Cloud Control Plane->>Secret Store: Store/retrieve/delete secret
Secret Store-->>Redpanda Cloud Control Plane: Confirmation/secret reference
Redpanda Cloud Control Plane-->>rpk CLI / API Client: Operation result
rpk CLI / API Client-->>User: Success/failure response
Assessment against linked issues
Possibly related PRs
Suggested reviewers
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for rp-cloud ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (7)
local-antora-playbook.yml (1)
17-19: Ensure YAML string formatting for branch patterns
The itemv/*is unquoted in the array literal, which could break YAML parsing or be misinterpreted. For consistency and safety, quote all branch names, e.g.:- branches: ['DOC-1216-single-source', v/*, api, shared, site-search] + branches: ['DOC-1216-single-source', 'v/*', 'api', 'shared', 'site-search']modules/get-started/pages/whats-new-cloud.adoc (1)
26-26: Clarify version requirement formatting
Consider formatting the version number as an Asciidoc literal or link (for example,v25.1) to improve readability and consistency with other version references.modules/manage/pages/api/cloud-dataplane-api.adoc (5)
103-109: Refine description of secret retrieval
The line "Secrets are stored in the secret management solution of your Cloud provider and are retrieved when you set a cluster property to reference the secret." could be clearer. Consider rephrasing to:Secrets are stored externally by your cloud provider’s secret management service and are fetched by Redpanda when you reference them in a cluster property.
111-119: Standardize curl example formatting
Thecurlexample mixes single quotes and has no space before line-continuation backslashes. For consistency with other examples, use double quotes and ensure a space before each\:-,bash ---- -curl -X POST "https://<dataplane-api-url>/v1/secrets" \ - -H 'accept: application/json'\ - -H 'authorization: Bearer <token>'\ - -H 'content-type: application/json' \ - -d '{"id":"<secret-name>","scopes":["SCOPE_REDPANDA_CLUSTER"],"secret_data":"<secret-value>"}' +[,bash] +---- +curl -X POST "https://<dataplane-api-url>/v1/secrets" \ + -H "accept: application/json" \ + -H "authorization: Bearer <token>" \ + -H "content-type: application/json" \ + -d '{"id":"<secret-name>","scopes":["SCOPE_REDPANDA_CLUSTER"],"secret_data":"<secret-value>"}' ----
120-127: Clarify<secret-value>placeholder
For consistency, rename<secret-value>to<secret-data>(or vice versa) throughout this section so that readers clearly understand it must be the Base64-encoded secret.
155-162: Add sample response for Delete secret
The delete operation’s behavior isn’t fully documented. Consider adding a sample response and expected status code, for example:[.no-copy] ---- Status: 204 No Content {} ----This will help users confirm success and handle the response appropriately.
232-239: Enhance syntax highlighting for JSON and Bash snippets
The new Kafka Connect secret example would benefit from explicit block types for syntax highlighting:[source,json] ---- {"secret.access.key": "<secret-access-key-value>"} ---- [source,bash] ---- echo '{"secret.access.key": "<secret-access-key-value>"}' | base64 ----This will improve readability in the rendered docs.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
local-antora-playbook.yml(1 hunks)modules/get-started/pages/whats-new-cloud.adoc(1 hunks)modules/manage/pages/api/cloud-dataplane-api.adoc(1 hunks)modules/manage/pages/iceberg/use-iceberg-catalogs.adoc(0 hunks)
💤 Files with no reviewable changes (1)
- modules/manage/pages/iceberg/use-iceberg-catalogs.adoc
🔇 Additional comments (2)
modules/get-started/pages/whats-new-cloud.adoc (1)
28-37: Approve addition of Manage secrets subsection
The new "Manage secrets for cluster configuration" section clearly explains the feature and links to both CLI and API workflows. Please verify that the xref anchors (#manage-secrets,#rpk-security-secret, and#rpk-cluster-config-set) resolve correctly in the generated documentation.modules/manage/pages/api/cloud-dataplane-api.adoc (1)
133-142: Approve Update secret endpoint example
ThePUT /v1/secrets/{id}snippet correctly shows how to update the secret data. The scope remains unchanged, which matches the API contract.
| * Manage secrets using the xref:manage:api/cloud-dataplane-api.adoc#manage-secrets[Data Plane API] | ||
| * Reference a secret in a cluster property using xref:reference:rpk/rpk-cluster/rpk-cluster-config-set.adoc[`rpk cluster config set`] | ||
| * Reference a secret in a cluster property using the xref:manage:cluster-maintenance/config-cluster.adoc[Control Plane API] | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rpk references above will work once #258 and redpanda-data/docs#1106 are merged
5380bc7 to
4a06fec
Compare
micheleRP
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
@kbatuigas just a reminder to check coderabbit's suggestions: #283 (review) |
Co-authored-by: Michele Cyran <michele@redpanda.com>
7c330e6 to
3bbc643
Compare
Description
This pull request introduces changes to support secret management in Redpanda Cloud, updates a branch reference in the Antora playbook, and removes an unused attribute from the Iceberg documentation. Below is a summary of the most important changes:
Secret Management Enhancements:
rpk. (modules/get-started/pages/whats-new-cloud.adoc,modules/manage/pages/api/cloud-dataplane-api.adoc) [1] [2]Configuration Updates:
DOC-1216-single-sourcebranch for thedocumentationrepository, replacing the previousmainbranch. (local-antora-playbook.yml)Documentation Cleanup:
:env-cloud:attribute from the Iceberg documentation, as it is no longer in use. (modules/manage/pages/iceberg/use-iceberg-catalogs.adoc)Resolves https://github.com/redpanda-data/documentation-private/issues/
Review deadline: 9 May
Page previews
Use Iceberg Catalogs > Store a secret for REST catalog authentication
Use the Data Plane APIs > Manage secrets
What's New in Cloud
Checks