Skip to content

feat(controlplane): add support for failover s3 bucket in helm chart#2803

Merged
pepol merged 1 commit intomainfrom
peter/eng-8555-dual-cdn-bucket
Apr 29, 2026
Merged

feat(controlplane): add support for failover s3 bucket in helm chart#2803
pepol merged 1 commit intomainfrom
peter/eng-8555-dual-cdn-bucket

Conversation

@pepol
Copy link
Copy Markdown
Member

@pepol pepol commented Apr 28, 2026

Summary by CodeRabbit

  • New Features

    • Added S3-compatible failover storage support; failover activates only when a failover storage URL is provided.
    • Runtime now exposes optional failover connection details (storage URL, endpoint, region, credentials, and path-style) when configured.
  • Documentation

    • Helm chart README and values documented with optional failover parameters and defaults.
  • Deployment

    • Control plane injects failover environment variables and secret entries into deployments when configured.

Checklist

Open Source AI Manifesto

This project follows the principles of the Open Source AI Manifesto. Please ensure your contribution aligns with its principles.

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ef9bdd69-ae1a-4146-a543-7837a16b0857

📥 Commits

Reviewing files that changed from the base of the PR and between b6f9bcc and 64cd4cb.

📒 Files selected for processing (5)
  • controlplane/src/bin/get-config.ts
  • helm/cosmo/charts/controlplane/README.md
  • helm/cosmo/charts/controlplane/templates/deployment.yaml
  • helm/cosmo/charts/controlplane/templates/secret.yaml
  • helm/cosmo/charts/controlplane/values.yaml
✅ Files skipped from review due to trivial changes (1)
  • controlplane/src/bin/get-config.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • helm/cosmo/charts/controlplane/templates/secret.yaml
  • helm/cosmo/charts/controlplane/values.yaml

Walkthrough

Adds conditional S3 failover configuration: new Helm values, Secret and Deployment template entries, README documentation, and TypeScript config builder now expose a top-level s3StorageFailover when corresponding env vars/values are set (with defaults for region and forcePathStyle).

Changes

Cohort / File(s) Summary
TypeScript Config
controlplane/src/bin/get-config.ts
getConfig() now conditionally returns a top-level s3StorageFailover object when S3_FAILOVER_STORAGE_URL is set; populated from S3_FAILOVER_* env vars. Defaults: region: 'auto', forcePathStyle: true unless explicitly provided.
Helm Values
helm/cosmo/charts/controlplane/values.yaml
Adds configuration.s3Failover* values: s3FailoverStorageUrl, s3FailoverRegion, s3FailoverEndpoint, s3FailoverAccessKeyId, s3FailoverSecretAccessKey, s3FailoverForcePathStyle (defaults empty; failover enabled when storage URL provided).
Helm Templates
helm/cosmo/charts/controlplane/templates/deployment.yaml, helm/cosmo/charts/controlplane/templates/secret.yaml
Deployment: conditionally injects S3_FAILOVER_* env vars into controlplane container from Secret/ConfigMap. Secret: conditionally adds failover stringData keys when values present.
Helm Docs
helm/cosmo/charts/controlplane/README.md
Documents the new configuration.s3Failover* chart values and states failover is gated by s3FailoverStorageUrl.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding failover S3 bucket support to the controlplane Helm chart. It is specific, descriptive, and directly reflects the changeset content.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@pepol pepol force-pushed the peter/eng-8555-dual-cdn-bucket branch 2 times, most recently from fc759eb to 1417b24 Compare April 28, 2026 11:26
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: 1

🧹 Nitpick comments (1)
helm/cosmo/charts/controlplane/values.yaml (1)

209-209: Make s3FailoverForcePathStyle default explicit for consistency.

Using '' works via app fallback, but setting it to 'true' (like primary S3) makes chart-level behavior explicit and matches the documented intent.

♻️ Suggested change
-  s3FailoverForcePathStyle: ''
+  s3FailoverForcePathStyle: 'true'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@helm/cosmo/charts/controlplane/values.yaml` at line 209, Update the Helm
chart value for s3FailoverForcePathStyle so its chart-level default is explicit
(set to 'true' instead of an empty string) to match primary S3 behavior and
documented intent; locate the s3FailoverForcePathStyle entry in the values.yaml
and change its default value from '' to 'true' so the chart conveys explicit
configuration rather than relying on application fallback.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@controlplane/src/bin/get-config.ts`:
- Around line 53-60: The s3StorageFailover block is broken: the ternary for
s3StorageFailover is missing a false branch and several env names are
incorrect/typoed. Update the conditional that sets s3StorageFailover to include
the false branch (e.g., return undefined when S3_FAILOVER_STORAGE_URL is falsy)
and correct the environment variable references inside the object to use
S3_FAILOVER_REGION (not S3_REGION) and S3_FAILOVER_FORCE_PATH_STYLE (not
S3_FAILOVER_FORCE_PATH_STYKE); also ensure the forcePathStyle expression
evaluates the right var and handles undefined correctly (e.g., default true when
the failover env var is undefined).

---

Nitpick comments:
In `@helm/cosmo/charts/controlplane/values.yaml`:
- Line 209: Update the Helm chart value for s3FailoverForcePathStyle so its
chart-level default is explicit (set to 'true' instead of an empty string) to
match primary S3 behavior and documented intent; locate the
s3FailoverForcePathStyle entry in the values.yaml and change its default value
from '' to 'true' so the chart conveys explicit configuration rather than
relying on application fallback.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5a544279-ec3c-498f-8b9c-762c92e561a7

📥 Commits

Reviewing files that changed from the base of the PR and between 41e3120 and 832c21a.

📒 Files selected for processing (5)
  • controlplane/src/bin/get-config.ts
  • helm/cosmo/charts/controlplane/README.md
  • helm/cosmo/charts/controlplane/templates/deployment.yaml
  • helm/cosmo/charts/controlplane/templates/secret.yaml
  • helm/cosmo/charts/controlplane/values.yaml

Comment thread controlplane/src/bin/get-config.ts Outdated
@pepol pepol enabled auto-merge (squash) April 28, 2026 11:26
@pepol pepol force-pushed the peter/eng-8555-dual-cdn-bucket branch 2 times, most recently from d07b84f to 0ad05b0 Compare April 28, 2026 11:47
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: 2

🧹 Nitpick comments (1)
helm/cosmo/charts/controlplane/values.yaml (1)

200-201: Consider defaulting failover region to auto for parity with primary S3 config.

This keeps failover setup behavior aligned with s3Region and reduces required overrides for common S3-compatible setups.

Suggested adjustment
-  s3FailoverRegion: ''
+  s3FailoverRegion: 'auto'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@helm/cosmo/charts/controlplane/values.yaml` around lines 200 - 201, The
s3FailoverRegion value in values.yaml is empty by default causing mismatch with
s3Region behavior; set s3FailoverRegion to 'auto' by default (same as s3Region)
so failover uses automatic region detection for S3-compatible setups, and update
the surrounding comment/documentation in values.yaml to reflect that 'auto' is
the default and what it means. Ensure you modify the s3FailoverRegion entry and
any README or chart docs that reference it to keep parity with the s3Region
setting.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@helm/cosmo/charts/controlplane/templates/deployment.yaml`:
- Around line 298-304: The template currently omits S3_FAILOVER_FORCE_PATH_STYLE
when .Values.configuration.s3FailoverForcePathStyle is false; change the
conditional to check for presence instead of truthiness (e.g., use hasKey
.Values.configuration "s3FailoverForcePathStyle" or test for nil) and always
render the env var with the literal value quoted, setting name:
S3_FAILOVER_FORCE_PATH_STYLE and value: {{
.Values.configuration.s3FailoverForcePathStyle | quote }} so explicit false is
emitted as "false".

In `@helm/cosmo/charts/controlplane/values.yaml`:
- Around line 208-209: The YAML default for s3FailoverForcePathStyle contradicts
its docstring: change the value of s3FailoverForcePathStyle from an empty string
to a boolean true (ensure it's a YAML boolean, not a string) so the default
behavior matches the comment; verify any templates or consumers that read
s3FailoverForcePathStyle expect a boolean and update them if they treat empty
string specially.

---

Nitpick comments:
In `@helm/cosmo/charts/controlplane/values.yaml`:
- Around line 200-201: The s3FailoverRegion value in values.yaml is empty by
default causing mismatch with s3Region behavior; set s3FailoverRegion to 'auto'
by default (same as s3Region) so failover uses automatic region detection for
S3-compatible setups, and update the surrounding comment/documentation in
values.yaml to reflect that 'auto' is the default and what it means. Ensure you
modify the s3FailoverRegion entry and any README or chart docs that reference it
to keep parity with the s3Region setting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8c2a3277-adcf-45d3-bb05-6b1f26158bb9

📥 Commits

Reviewing files that changed from the base of the PR and between d07b84f and 0ad05b0.

📒 Files selected for processing (5)
  • controlplane/src/bin/get-config.ts
  • helm/cosmo/charts/controlplane/README.md
  • helm/cosmo/charts/controlplane/templates/deployment.yaml
  • helm/cosmo/charts/controlplane/templates/secret.yaml
  • helm/cosmo/charts/controlplane/values.yaml
✅ Files skipped from review due to trivial changes (2)
  • controlplane/src/bin/get-config.ts
  • helm/cosmo/charts/controlplane/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • helm/cosmo/charts/controlplane/templates/secret.yaml

Comment thread helm/cosmo/charts/controlplane/templates/deployment.yaml
Comment thread helm/cosmo/charts/controlplane/values.yaml
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.32%. Comparing base (7a61b3c) to head (64cd4cb).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
controlplane/src/bin/get-config.ts 0.00% 13 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2803       +/-   ##
===========================================
+ Coverage   46.22%   64.32%   +18.10%     
===========================================
  Files        1045      311      -734     
  Lines      139820    44308    -95512     
  Branches     8792     4767     -4025     
===========================================
- Hits        64633    28502    -36131     
+ Misses      73422    15783    -57639     
+ Partials     1765       23     -1742     
Files with missing lines Coverage Δ
controlplane/src/bin/get-config.ts 0.00% <0.00%> (ø)

... and 734 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread helm/cosmo/charts/controlplane/templates/deployment.yaml
@pepol pepol force-pushed the peter/eng-8555-dual-cdn-bucket branch from 0ad05b0 to b6f9bcc Compare April 29, 2026 12:53
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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@helm/cosmo/charts/controlplane/README.md`:
- Line 57: Update the README entry for the Helm chart property
configuration.s3FailoverForcePathStyle to use the phrasing "path-style URLs"
(hyphenate "path-style" and capitalize "URLs") in its description; locate the
table row containing configuration.s3FailoverForcePathStyle and replace the
current description text so it reads something like "Forces usage of path-style
URLs for the failover S3. Default is true." ensuring the exact property name and
default remain unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 562e7ee8-268e-4fc0-87fb-2caad242dd22

📥 Commits

Reviewing files that changed from the base of the PR and between 0ad05b0 and b6f9bcc.

📒 Files selected for processing (5)
  • controlplane/src/bin/get-config.ts
  • helm/cosmo/charts/controlplane/README.md
  • helm/cosmo/charts/controlplane/templates/deployment.yaml
  • helm/cosmo/charts/controlplane/templates/secret.yaml
  • helm/cosmo/charts/controlplane/values.yaml
✅ Files skipped from review due to trivial changes (1)
  • helm/cosmo/charts/controlplane/values.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • helm/cosmo/charts/controlplane/templates/secret.yaml

Comment thread helm/cosmo/charts/controlplane/README.md
Copy link
Copy Markdown
Contributor

@wilsonrivera wilsonrivera left a comment

Choose a reason for hiding this comment

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

LGTM

@pepol pepol disabled auto-merge April 29, 2026 13:44
@pepol pepol enabled auto-merge (squash) April 29, 2026 13:44
@pepol pepol force-pushed the peter/eng-8555-dual-cdn-bucket branch from b6f9bcc to 64cd4cb Compare April 29, 2026 13:44
@pepol pepol merged commit 9780ce7 into main Apr 29, 2026
13 checks passed
@pepol pepol deleted the peter/eng-8555-dual-cdn-bucket branch April 29, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants