Skip to content

🐛 OCPBUGS-85508: fix chunked storage ChunkSize to fit within Kubernetes Secret limit - #2702

Merged
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
joelanford:fix-OCPBUGS-85508
May 13, 2026
Merged

🐛 OCPBUGS-85508: fix chunked storage ChunkSize to fit within Kubernetes Secret limit#2702
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
joelanford:fix-OCPBUGS-85508

Conversation

@joelanford

@joelanfordjoelanford commented May 13, 2026

Copy link
Copy Markdown
Member

Description

The chunked Helm release storage driver set ChunkSize to exactly 1MB (1,048,576 bytes),
which is also the Kubernetes Secret data limit. The index Secret stores both the first chunk
(Data["chunk"]) and a JSON list of extra chunk names (Data["extraChunks"]), so any release
requiring chunking exceeded the 1MB limit and failed:

Secret "sh.helm.release.v1.odf-operator.v1" is invalid:
data: Too long: may not be more than 1048576 bytes

Jira: https://redhat.atlassian.net/browse/OCPBUGS-85508

This PR:

  • Reduces ChunkSize from 1024 * 1024 to (1024 - 8) * 1024, leaving 8KB headroom for the extraChunks field
  • Increases MaxReadChunks and MaxWriteChunks from 10 to 11 to maintain total capacity above the previous theoretical maximum
  • Adds an envtest-based regression test that stores a max-capacity release (filling all 11 chunks) through the real chunked storage driver against a real API server, then verifies the round-trip and that the first 10 chunks are at ChunkSize
  • Adds static tests to guard against future regressions in total capacity, chunk limits, and read/write symmetry

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

🤖 Generated with Claude Code via /jira:solve OCPBUGS-85508

CopilotAI review requested due to automatic review settings May 13, 2026 17:28
@openshift-ciopenshift-ciBot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 13, 2026
@netlify

netlifyBot commented May 13, 2026

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

NameLink
🔨 Latest commit0e609d2
🔍 Latest deploy loghttps://app.netlify.com/projects/olmv1/deploys/6a04c406e23f8f00082fe4b1
😎 Deploy Previewhttps://deploy-preview-2702--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changesRun an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@joelanfordjoelanford changed the title OCPBUGS-85508: fix chunked storage ChunkSize to fit within Kubernetes Secret limit🐛 OCPBUGS-85508: fix chunked storage ChunkSize to fit within Kubernetes Secret limitMay 13, 2026
@joelanford
joelanford marked this pull request as ready for review May 13, 2026 17:32
@openshift-ciopenshift-ciBot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 13, 2026

CopilotAI 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

This PR fixes Helm release chunked Secret storage exceeding the Kubernetes 1MiB Secret .data limit by reducing per-chunk size and adjusting chunk count limits, and adds regression tests to prevent the issue from returning.

Changes:

  • Reduce ChunkSize for chunked Secret storage to leave headroom for the index Secret’s extraChunks field.
  • Increase MaxReadChunks/MaxWriteChunks to preserve (and slightly increase) total storage capacity.
  • Add envtest-based and static regression tests around chunk sizing, capacity, and read/write symmetry.

Reviewed changes

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

FileDescription
internal/operator-controller/action/storagedriver.goIntroduces a shared chunked Secret config with smaller ChunkSize and higher chunk limits, applied when constructing the Helm storage driver.
internal/operator-controller/action/storagedriver_test.goAdds regression coverage for capacity invariants and an envtest round-trip that exercises max-capacity chunking behavior.
internal/operator-controller/action/action_test.goAdds package-level envtest TestMain to provide a real API server for the new storage driver integration test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadinternal/operator-controller/action/storagedriver_test.go
Comment threadinternal/operator-controller/action/storagedriver_test.go
Comment threadinternal/operator-controller/action/storagedriver_test.go
@codecov

codecovBot commented May 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.07%. Comparing base (869124a) to head (0e609d2).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #2702 +/- ##
==========================================
- Coverage 68.10% 68.07% -0.03% 
==========================================
Files 145 145 Lines 10700 10698 -2 ==========================================
- Hits 7287 7283 -4 - Misses 2885 2886 +1 - Partials 528 529 +1 
FlagCoverage Δ
e2e36.84% <100.00%> (-0.30%)⬇️
experimental-e2e52.54% <100.00%> (+0.08%)⬆️
unit53.77% <0.00%> (-0.02%)⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

CopilotAI review requested due to automatic review settings May 13, 2026 18:27

CopilotAI 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

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

Comment threadinternal/operator-controller/action/storagedriver_test.go
Comment threadinternal/operator-controller/action/storagedriver_test.go
… limit
OCPBUGS-85508
The chunked Helm release storage driver set ChunkSize to exactly 1MB
(1,048,576 bytes), which is the Kubernetes Secret data limit. The index
Secret stores both the first chunk and a JSON list of extra chunk names
(extraChunks), so any release requiring chunking exceeded the limit:
Secret "sh.helm.release.v1.odf-operator.v1" is invalid:
data: Too long: may not be more than 1048576 bytes
Reduce ChunkSize to (1024-8)*1024 (1,040,384 bytes), leaving 8KB of
headroom for the extraChunks field, and increase MaxReadChunks and
MaxWriteChunks from 10 to 11 to maintain total capacity above the
previous theoretical maximum.
CopilotAI review requested due to automatic review settings May 13, 2026 18:33

CopilotAI 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

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

Comment threadinternal/operator-controller/action/storagedriver_test.go
Comment threadinternal/operator-controller/action/action_test.go
@tmshort

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tmshort

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ciopenshift-ciBot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 13, 2026
@grokspawn

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ciopenshift-ciBot added the lgtm Indicates that a PR is ready to be merged. label May 13, 2026
@openshift-merge-bot
openshift-merge-botBot merged commit f120442 into operator-framework:mainMay 13, 2026
31 checks passed
@joelanford
joelanford deleted the fix-OCPBUGS-85508 branch May 13, 2026 19:09
@openshift-merge-robot

Copy link
Copy Markdown

Fix included in release 5.0.0-0.nightly-2026-05-14-220455

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by an approver from all required OWNERS files.lgtmIndicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@joelanford@tmshort@grokspawn@openshift-merge-robot