Context
Vault configuration currently mixes two responsibilities:
- defining environment/secrets delivered to a target;
- defining the
apps set that should be running on that target.
This becomes awkward with multiple vault/env sources. If several vaults contribute configuration to one deployment, apps also has to be merged across those vaults even though application selection is fundamentally a property of the target deployment, not of an individual vault.
Proposal
Move apps out of the vault configuration and into the target configuration.
Conceptually, a target becomes the composition root for a deployment:
target:
app_refs:
- owner/apps-a@v1
- owner/apps-b@v2env_refs:
- owner/vault-a@v3
- owner/vault-b@v5apps:
- traefik
- rybbit
- postgres
The responsibilities then become:
- app bundle — provides deployable application definitions;
- vault/env bundle — provides encrypted environment/configuration;
- target — selects the sources and declares the final desired set of running applications.
Why
This removes apps from env/vault merge semantics entirely.
Multiple vaults can be combined without having to union or otherwise reconcile their apps sections. Environment merging can therefore deal only with actual environment values and their conflict policy. This directly removes one of the two blocking obstacles raised in #104 (env_refs/multi-vault merging) — the APPS= generated-aggregate problem goes away entirely once apps isn't rendered per-vault anymore. #104's remaining obstacle (cross-repo age-key-recipient coordination) is unaffected by this change and still needs its own answer.
It also makes apps an explicit desired-state property of the target.
Validation
Moving apps out of vaults removes the implicit relationship between an app and the vault that supplies its configuration.
Where useful, this should be handled through validation rather than by coupling application selection back to vaults. For example, an app definition could eventually declare required environment keys, allowing deployment to fail when the final merged environment does not satisfy the selected apps.
Migration
No external consumers of flightdeck's vault/target schema exist yet — this is a breaking schema change, not a deprecation. Move apps to the target and drop it from the vault schema outright; no legacy dual-support period needed.
Follow-ups split out
Context
Vault configuration currently mixes two responsibilities:
appsset that should be running on that target.This becomes awkward with multiple vault/env sources. If several vaults contribute configuration to one deployment,
appsalso has to be merged across those vaults even though application selection is fundamentally a property of the target deployment, not of an individual vault.Proposal
Move
appsout of the vault configuration and into the target configuration.Conceptually, a target becomes the composition root for a deployment:
The responsibilities then become:
Why
This removes
appsfrom env/vault merge semantics entirely.Multiple vaults can be combined without having to union or otherwise reconcile their
appssections. Environment merging can therefore deal only with actual environment values and their conflict policy. This directly removes one of the two blocking obstacles raised in #104 (env_refs/multi-vault merging) — theAPPS=generated-aggregate problem goes away entirely onceappsisn't rendered per-vault anymore. #104's remaining obstacle (cross-repo age-key-recipient coordination) is unaffected by this change and still needs its own answer.It also makes
appsan explicit desired-state property of the target.Validation
Moving
appsout of vaults removes the implicit relationship between an app and the vault that supplies its configuration.Where useful, this should be handled through validation rather than by coupling application selection back to vaults. For example, an app definition could eventually declare required environment keys, allowing deployment to fail when the final merged environment does not satisfy the selected apps.
Migration
No external consumers of flightdeck's vault/target schema exist yet — this is a breaking schema change, not a deprecation. Move
appsto the target and drop it from the vault schema outright; no legacy dual-support period needed.Follow-ups split out
appsinto a generated deployment manifest and diffing against the previous release to stop orphaned apps. Depends on this issue landing first, not required for it.