Skip to content

feat(create)!: validate package secret size - #5528

Merged
AustinAbro321 merged 11 commits into
mainfrom
validate-package-secret-size
Oct 28, 2026
Merged

AustinAbro321 merged 11 commits into
mainfrom
validate-package-secret-size

Conversation

@AustinAbro321

Copy link
Copy Markdown
Member

Description

This adds validation that the package on create won't exceed the kubernetes secret size.

I decided to make the check 1mb, at least on create, so there is room for any additional options that we might add on deploy. Should still be plenty.

We'll let this bake for a release, then add a pre-flight check on deploy, and fail if the secret fails to save.

Related Issue

Relates to #5517

Checklist before merging

Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
@netlify

netlify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 112ccf9
🔍 Latest deploy log https://app.netlify.com/projects/zarf-docs/deploys/6ae227781b75264dc6710399

@AustinAbro321
AustinAbro321 marked this pull request as draft October 23, 2026 18:54
@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.07407% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pkg/packager/create.go 75.00% 4 Missing and 2 partials ⚠️
src/pkg/packager/deploy.go 66.66% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/pkg/packager/deploy.go 43.91% <66.66%> (+1.48%) ⬆️
src/pkg/packager/create.go 60.00% <75.00%> (-0.38%) ⬇️

... and 40 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.

Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
Signed-off-by: Austin Abro <austinabro321@gmail.com>
@AustinAbro321
AustinAbro321 marked this pull request as ready for review October 26, 2026 15:12
Signed-off-by: Austin Abro <austinabro321@gmail.com>
brandtkeller
brandtkeller previously approved these changes Oct 28, 2026

@brandtkeller brandtkeller left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm - my only other preference would be whether we wanted to instead have a function return the marshalled deployedpackage in such a way as to add a debug log indicating size and/or create some threshold for a warning.

I do not know how niche this would be after the annotation size limiters so I wouldn't block on it - just thinking about how to be more observable.

@AustinAbro321

Copy link
Copy Markdown
Member Author

@brandtkeller I updated the error message, since I think the split into smaller packages advice doesn't make a ton of sense, but I think if you have a package this big it should be obvious what's causing it

Signed-off-by: Austin Abro <austinabro321@gmail.com>
brandtkeller
brandtkeller previously approved these changes Oct 28, 2026
Comment thread src/pkg/packager/create.go Resolved
Co-authored-by: Brandt Keller <43887158+brandtkeller@users.noreply.github.com>
Signed-off-by: Austin Abro <37223396+AustinAbro321@users.noreply.github.com>
brandtkeller
brandtkeller previously approved these changes Oct 28, 2026
Signed-off-by: Austin Abro <austinabro321@gmail.com>
@AustinAbro321
AustinAbro321 added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit fdf6f98 Oct 28, 2026
31 checks passed
@AustinAbro321
AustinAbro321 deleted the validate-package-secret-size branch October 28, 2026 22:28
@github-project-automation github-project-automation Bot moved this to Done in Zarf Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants