🐛 OCPBUGS-85508: fix chunked storage ChunkSize to fit within Kubernetes Secret limit#2702
🐛 OCPBUGS-85508: fix chunked storage ChunkSize to fit within Kubernetes Secret limit#2702joelanford wants to merge 1 commit into
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
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
ChunkSizefor chunked Secret storage to leave headroom for the index Secret’sextraChunksfield. - Increase
MaxReadChunks/MaxWriteChunksto 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.
| File | Description |
|---|---|
| internal/operator-controller/action/storagedriver.go | Introduces 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.go | Adds regression coverage for capacity invariants and an envtest round-trip that exercises max-capacity chunking behavior. |
| internal/operator-controller/action/action_test.go | Adds 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.
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3a30af1 to
03de71e
Compare
03de71e to
1fc83a2
Compare
1fc83a2 to
0e0f97b
Compare
… 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.
0e0f97b to
0e609d2
Compare
|
/approve |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
Description
The chunked Helm release storage driver set
ChunkSizeto 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 releaserequiring chunking exceeded the 1MB limit and failed:
Jira: https://redhat.atlassian.net/browse/OCPBUGS-85508
This PR:
ChunkSizefrom1024 * 1024to(1024 - 8) * 1024, leaving 8KB headroom for theextraChunksfieldMaxReadChunksandMaxWriteChunksfrom 10 to 11 to maintain total capacity above the previous theoretical maximumChunkSizeReviewer Checklist
🤖 Generated with Claude Code via
/jira:solve OCPBUGS-85508