feat: make a vault manifest's env: optional - #158
Merged
Conversation
Some apps genuinely need zero vault-sourced values - config lives in a
mounted volume, or first-run setup happens through the app's own UI
(beszel, databasus in this catalog; changedetection, home-assistant in
a downstream consumer repo). render-env.py previously rejected any
manifest whose env: was empty, forcing an invented entry (e.g. a TZ
value nobody verified the image even reads) just to satisfy the schema.
env: can now be omitted or empty (env: {}) - renders an empty .env,
verified end-to-end including a real sops encrypt/decrypt round trip
on an empty dotenv file (exits 0, no error). The vault manifest itself
is still required - an app's env_refs must still reference at least
one - this only relaxes what that vault's own env: mapping can contain.
Fixes #157
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Aug 25, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #157.
render-env.pypreviously rejected any vault manifest whoseenv:was empty - but some apps genuinely need zero vault-sourced values (config lives in a mounted volume, or first-run setup happens through the app's own UI):beszel/databasusin this repo's own catalog,changedetection/home-assistantin a downstream consumer repo. The workaround was inventing an entry (e.g. aTZvalue nobody actually verified the image reads) just to satisfy the schema.env:can now be omitted orenv: {}- renders an empty.env. Verified the full pipeline handles this, not just the Python layer: ran a realsops encrypt/decryptround trip on an empty dotenv file locally, exits 0 with no error either direction.The vault manifest is still required (
apps.<name>.env_refsmust still reference at least one) - this only relaxes what that vault's ownenv:mapping can contain.Test plan
deploy/tests/+encrypt-env/tests/+load-yaml-matrix/tests/(74 tests, new empty/omitted-env tests added) passsops encrypt/decryptround-trips an empty dotenv file cleanly (exit 0 both directions)