Skip to content

tiered storage: fix kubernetes specific blocks#1325

Merged
paulohtb6 merged 1 commit intomainfrom
fix-tiered-storage
Aug 20, 2025
Merged

tiered storage: fix kubernetes specific blocks#1325
paulohtb6 merged 1 commit intomainfrom
fix-tiered-storage

Conversation

@paulohtb6
Copy link
Copy Markdown
Contributor

Description

Resolves https://redpandadata.atlassian.net/browse/
Review deadline:

Page previews

Checks

  • New feature
  • Content gap
  • Support Follow-up
  • Small fix (typos, links, copyedits, etc)

@paulohtb6 paulohtb6 requested a review from a team as a code owner August 19, 2025 20:33
@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 19, 2025

Deploy Preview for redpanda-docs-preview ready!

Name Link
🔨 Latest commit 4d61e45
🔍 Latest deploy log https://app.netlify.com/projects/redpanda-docs-preview/deploys/68a4dfb41b144c000837aa50
😎 Deploy Preview https://deploy-preview-1325--redpanda-docs-preview.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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 19, 2025

📝 Walkthrough

Walkthrough

This PR updates modules/manage/partials/tiered-storage.adoc with documentation-only edits. It replaces inline Kubernetes env-gating with multi-line ifndef/endif blocks, adds explicit endif markers, and inserts spacing for structure. It adds a new “Set a maximum cache size” section covering cache eviction and trim thresholds with related properties. It expands cloud provider sections with placeholder-replacement guidance and integrates KMS key-management partials for AWS, GCP, and Azure via leveloffset includes. It also adds includes and examples for provider configurations (cloud-storage.yaml, redpanda-cluster.yaml) and updates example commands accordingly.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant RP as Redpanda Node
  participant Cache as Local Cache
  participant CS as Cloud Storage

  note over RP,Cache: Cache management (new doc section)
  loop Every cache_check_interval_ms
    RP->>Cache: Measure used bytes
    alt used > max_size OR used% > trim_threshold%
      RP->>Cache: Evict chunks (per eviction_strategy)
      Cache-->>RP: Freed space
    else
      RP-->>RP: No action
    end
  end

  RP->>CS: Fetch/upload chunks as needed
  CS-->>RP: Data/ACK
Loading
sequenceDiagram
  autonumber
  participant Client as Client
  participant RP as Redpanda
  participant KMS as Cloud KMS
  participant CS as Cloud Storage

  note over RP,KMS: KMS-integrated tiered storage (docs integration)
  Client->>RP: Produce/Consume data
  RP->>KMS: Retrieve/unwrap key (per provider config)
  KMS-->>RP: Data key/Materials
  RP->>CS: Put/Get object (provider bucket/container, region)
  CS-->>RP: ACK/Object
  RP-->>Client: ACK/Data
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • masapanda
  • micheleRP
  • david-yu

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-tiered-storage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@paulohtb6 paulohtb6 requested a review from JakeSCahill August 19, 2025 20:34
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a 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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
modules/manage/partials/tiered-storage.adoc (4)

333-339: Fix GCS Helm example: wrong credentials source (aws → gcp)

The GCS IAM role Helm --set example uses aws_instance_metadata. For GCS it must be gcp_instance_metadata. This will misconfigure clusters on GKE.

Apply this diff:

   --set storage.tiered.config.cloud_storage_enabled=true \
   --set storage.tiered.config.cloud_storage_api_endpoint=storage.googleapis.com \
-  --set storage.tiered.config.cloud_storage_credentials_source=aws_instance_metadata \
+  --set storage.tiered.config.cloud_storage_credentials_source=gcp_instance_metadata \
   --set storage.tiered.config.cloud_storage_region=<region> \
   --set storage.tiered.config.cloud_storage_bucket=<redpanda-bucket-name>

1352-1367: Remove duplicated YAML header in Operator example

The Operator example for “Use a specific StorageClass” repeats the apiVersion/kind/metadata/spec/chartRef/clusterSpec header twice inside one code block. This will confuse users copy-pasting.

Apply this diff to remove the duplicate header (second occurrence):

-apiVersion: cluster.redpanda.com/v1alpha2
-kind: Redpanda
-metadata:
-  name: redpanda
-spec:
-  chartRef: {}
-  clusterSpec:

1495-1497: Correct property name and wording: mountType vs mountPath, file vs directory

The bullets mix up mountType with mountPath and call for a “file” path. The YAML below uses mountType: hostPath and a directory path.

Apply this diff:

-. Set the `storage.tiered.mountPath` configuration to `hostPath`.
+. Set the `storage.tiered.mountType` configuration to `hostPath`.
-. Set the `storage.tiered.hostPath` configuration to the absolute path of a file on the local worker node.
+. Set the `storage.tiered.hostPath` configuration to the absolute path of a directory on the local worker node.

1203-1215: Use the correct topic property: redpanda.remote.allow_gaps (underscore)

Earlier text and the cluster-level key use allow_gaps, but the commands here use allowgaps. This inconsistency will fail at runtime.

Apply this diff:

-rpk topic alter-config $topic-name --set redpanda.remote.allowgaps=true
+rpk topic alter-config $topic-name --set redpanda.remote.allow_gaps=true-# Disable the gap allowance previously set for the topic.
-rpk topic alter-config $topic-name --set redpanda.remote.allowgaps=false
+# Disable the gap allowance previously set for the topic.
+rpk topic alter-config $topic-name --set redpanda.remote.allow_gaps=false
🧹 Nitpick comments (2)
modules/manage/partials/tiered-storage.adoc (2)

572-576: Remove stray AsciiDoc open block markers around placeholders list

The -- markers around the placeholder list are unnecessary and may alter rendering. Other sections list placeholders without wrapping blocks.

Apply this diff:

---
---
 - `<account-name>`: The name of your Azure account.
 - `<container-name>`: The name of the Azure container in your Azure account.
 - `<managed-identity-client-id>`: The client ID for your Azure managed identity.
---

90-94: Use consistent boolean types in YAML examples

Some examples quote booleans ("true") while others use native booleans (true). Prefer one style (ideally native booleans) for consistency, unless the Operator specifically requires strings.

Apply this diff (if strings are not required):

-          cloud_storage_enabled: "true"
+          cloud_storage_enabled: true

Repeat similarly where applicable in other YAML snippets.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 887de40 and 4d61e45.

📒 Files selected for processing (1)
  • modules/manage/partials/tiered-storage.adoc (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Redirect rules - redpanda-docs-preview
  • GitHub Check: Header rules - redpanda-docs-preview
  • GitHub Check: Pages changed - redpanda-docs-preview
🔇 Additional comments (2)
modules/manage/partials/tiered-storage.adoc (2)

1568-1569: Kubernetes gating block correctly closed

Explicit endif for the long env-kubernetes block improves readability and reduces gating drift. LGTM.


1622-1624: Non-Kubernetes edit hint gated correctly in both sections

Using ifndef::env-kubernetes[] around the “Edit them with rpk cluster config edit” note prevents Helm/Operator confusion on Kubernetes pages. Good consistency.

Also applies to: 1688-1690

Copy link
Copy Markdown
Contributor

@kbatuigas kbatuigas left a comment

Choose a reason for hiding this comment

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

I think this looks good, thanks! Would get @JakeSCahill to confirm that the k8s version of the doc looks correct as well.

Also reminder to rebase to get the link text for the blog updated from the other PR!

@paulohtb6 paulohtb6 merged commit c546715 into main Aug 20, 2025
7 checks passed
@paulohtb6 paulohtb6 deleted the fix-tiered-storage branch August 20, 2025 20:46
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.

3 participants