feat(spire,spectre): support secret-backed env vars via env.raw - #331
Merged
Conversation
Both charts render only .Values.env.normal, which inlines every value as plain text, so there is no way to pass a secret to spire or spectre. That blocks RFC-036: the NATS transport needs CFG_NATS_TOKEN, which must come from a Secret and cannot be committed to app-of-apps. Adds the same env.raw passthrough the validator chart already uses, so a list of core/v1 EnvVar entries can be supplied verbatim alongside the existing normal map. Backwards compatible: env.raw defaults to [] and the block is skipped when unset, so charts render byte-identically for every current consumer.
devkoriel
added a commit
that referenced
this pull request
Aug 6, 2026
yamllint's new-line-at-end-of-file rule fails on this file. ct lint only runs against charts a PR touches, so it stayed hidden until #331 modified the spire chart, and it will fail every future spire PR until fixed. Pre-existing, not introduced by #331: git show confirms the file already ended without a newline before that change.
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.
Why
Neither chart can pass a secret to its container.
helpers.list-env-variablesrenders only.Values.env.normal, which inlines every value as plain text, and there is noenvFromorsecretKeyRefpath anywhere in either deployment template.That blocks RFC-036: the NATS transport needs
CFG_NATS_TOKEN, which comes from Vault and cannot be committed to app-of-apps. Today 24 spectre relays and 4 spire deployments in staging simply cannot receive it.What
Adds the
env.rawpassthrough that the validator chart already uses (charts/validator/templates/deployment.yaml:155anddeployment-vao.yaml:139), so the three Chronicle app charts behave consistently:spire0.3.5 → 0.3.6,spectre0.3.7 → 0.3.8. READMEs regenerated with helm-docs (only these two charts; helm-docs also wanted to rewrite nine unrelated chart READMEs from pre-existing drift, and I reverted those to keep this diff honest).Backwards compatibility
env.rawdefaults to[]and the block is skipped when unset, so output is byte-identical for every current consumer. Verified by rendering both charts with default values: spire still emits 0 env vars, spectre still emits its usual 7.With the key set, both charts render the secret reference correctly alongside
env.normal:Usage after release
app-of-apps wires
CFG_NATS_TOKENinto the spire and relay appsets, sourced from the same Vault key the stage-nats server authenticates against. That PR follows once these versions are published, since it needs thetargetRevisionbumps.