Skip to content

feat(spectre): read CFG_CHAIN_RPC_URLS from a Secret [sc-22327] - #338

Merged
devkoriel merged 1 commit into
mainfrom
sc-22327-spectre-rpc-url-secret
Oct 27, 2026
Merged

devkoriel merged 1 commit into
mainfrom
sc-22327-spectre-rpc-url-secret

Conversation

@devkoriel

Copy link
Copy Markdown
Contributor

Spectre renders CFG_CHAIN_RPC_URLS from the plain rpcUrl value, so an RPC URL that carries an API key has to sit in Helm values. This adds rpcUrlSecret {name, key}: when name is set, the entry becomes valueFrom.secretKeyRef and rpcUrl is ignored. A name without a key fails the render.

A second CFG_CHAIN_RPC_URLS through env.raw does not work as a stopgap: duplicate env names break the Argo CD diff, and on first apply the strategic merge folds value and valueFrom into one entry that pod validation rejects.

Changes

  • templates/deployment.yaml: CFG_CHAIN_RPC_URLS comes from the Secret when rpcUrlSecret.name is set, otherwise the plain value as before.
  • values.yaml, README.md: rpcUrlSecret with empty defaults; README regenerated with helm-docs 1.14.2.
  • ci/secret-rpc-values.yaml: installs with an empty rpcUrl and the URL in a Secret, so ct install fails if this path breaks.
  • Chart 0.3.9 to 0.3.10.

With rpcUrlSecret unset the render is byte-identical to 0.3.9 apart from the helm.sh/chart label. That label is not on the pod template, so existing releases do not restart on upgrade.

Testing

  • helm template on Helm 3.11.2 (CI) and 3.19.4: chart defaults, ci/testnet-envs-values.yaml, a production relay's values, rpcUrlSecret: null and a key without a name all render identical to 0.3.9 (chart label normalised). With the Secret set, only the CFG_CHAIN_RPC_URLS entry changes, and it appears exactly once.
  • A name without a key fails with rpcUrlSecret.key is required when rpcUrlSecret.name is set.
  • helm lint --strict with each ci file, and ct lint with the CI config (version bump accepted).
  • ct install on kind with both ci files: install and both helm tests pass.
  • Image pin gate replay: the only chronicle image stays digest-pinned.

[sc-22327]

Add rpcUrlSecret {name, key}. When name is set, CFG_CHAIN_RPC_URLS comes
from valueFrom.secretKeyRef and rpcUrl is ignored, so an RPC URL that
carries an API key can stay out of plain Helm values. A name without a
key fails the render. With the value unset the render is unchanged apart
from the chart label, so current releases see no pod change.

ci/secret-rpc-values.yaml installs the relay with an empty rpcUrl and the
URL in a Secret, so ct install fails if the Secret path breaks.

Bump spectre to 0.3.10.
@devkoriel
devkoriel merged commit 1feb7b7 into main Oct 27, 2026
3 checks passed
@devkoriel
devkoriel deleted the sc-22327-spectre-rpc-url-secret branch October 27, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants