Skip to content

secret: Resolve secrets in x-pre_deploy too - #423

Open
miekg wants to merge 3 commits into
psviderski:mainfrom
miekg:miek/26/aug19wo/secrets-env
Open

miekg wants to merge 3 commits into
psviderski:mainfrom
miekg:miek/26/aug19wo/secrets-env

Conversation

@miekg

@miekg miekg commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This adds the secret:// resolving to the Environment in x-pre_deploy too. Further more the Environment is set to nil when commiting the container to the store.

Fixes: #422

miekg added 3 commits August 19, 2026 13:24
This adds the secret:// resolving to the Environment in x-pre_deploy
too. Further more the Environment is set to nil when commiting the
container to the store.

Fixes: psviderski#422

Signed-off-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Miek Gieben <miek@miek.nl>
This changes the map, which we dont wont

Signed-off-by: Miek Gieben <miek@miek.nl>
@vky5

vky5 commented Aug 19, 2026

Copy link
Copy Markdown

Opened #424 before I saw this, same two fixes. This one doesn't cover the gap for container.go though, no test on the storage-side half of the bug. That's the one the issue title is about. I added one for it in 424, plus a test that a secret referenced from both environment and x-pre_deploy.environment only resolves once.

Also pulled the resolve loop into a shared helper instead of duplicating it in ResolveSecrets and HasCommandSecretRefs. Not required, just less to keep in sync next time someone adds a field.

Whichever you want, I'll rebase the tests onto this one, or close 424.

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.

[BUG] PreDeploy.Env is not stripped before replication to the cluster store, while Container.Env is

2 participants