Skip to content

feat(validator): read CFG_CHAIN_RPC_URLS from a Secret [sc-22327] - #339

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

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

Conversation

@devkoriel

Copy link
Copy Markdown
Contributor

Same change as #338 for the validator chart. Ghost renders CFG_CHAIN_RPC_URLS from ghost.rpcUrl, and VAO from vao.rpcUrl with a fallback to ghost.rpcUrl, so a target-chain RPC URL that carries an API key cannot come from a Secret.

Changes

  • ghost.rpcUrlSecret {name, key} and vao.rpcUrlSecret {name, key}. Within a container the Secret wins over the plain URL. VAO uses its own pair when vao.rpcUrlSecret.name or vao.rpcUrl is set, otherwise the ghost pair, the same fallback vao.rpcUrl has today. A name without a key fails the render.
  • New helper validator.rpcUrlEnvSource renders either form for both Deployments.
  • ci/testnet-envs-values.yaml now reads the ghost URL from a Secret, and VAO inherits it. ci/mainnet-envs-values.yaml keeps covering the plain path.
  • Chart 0.8.2 to 0.9.0 (opt-in value, minor bump as with 0.7.0).

With the new values unset the render is byte-identical to 0.8.2 apart from the helm.sh/chart label, which is not on the pod templates. Releases that float on the chart version only see that label change.

Testing

  • helm template on Helm 3.11.2 and 3.19.4: defaults, both ci files as they are on main, a production validator's values, rpcUrlSecret: null, vao.rpcUrl: "" and keys without names all render identical to 0.8.2. Four Secret layouts (ghost inherited by VAO, explicit on both, VAO only, ghost Secret with a plain vao.rpcUrl) change only the CFG_CHAIN_RPC_URLS entries, once per container.
  • ghost.rpcUrlSecret or vao.rpcUrlSecret with a name and no key fails the render and names the path.
  • helm lint --strict with each ci file, and ct lint with the CI config.
  • kind: the testnet fixture installs, and both containers read CFG_CHAIN_RPC_URLS from the Secret.

Known, not from this PR

The validator ct install fixtures already fail on main. Ghost 0.81.0 cannot load the config it downloads at start (An argument named "broadcast_mode" is not expected here), so the mainnet install times out and ghost-test-connection fails on the testnet fixture. I reproduced both with the unchanged 0.8.2 chart and the unchanged fixtures, and this PR gives the same helm test results. It needs a separate fix (a newer default image, or fixtures that pin a config).

Merge after #338 has released: two overlapping Release Charts runs have dropped index entries before (#336).

[sc-22327]

Add ghost.rpcUrlSecret and vao.rpcUrlSecret {name, key}. When name is
set, the container's CFG_CHAIN_RPC_URLS comes from valueFrom.secretKeyRef
and the plain rpcUrl is ignored. VAO uses its own pair when
vao.rpcUrlSecret.name or vao.rpcUrl is set, otherwise the ghost pair,
the same fallback vao.rpcUrl has today. A name without a key fails the
render. The new validator.rpcUrlEnvSource helper renders either form.

With the values unset the render is unchanged apart from the chart
label, which is not on the pod templates.

ci/testnet-envs-values.yaml now reads the ghost URL from a Secret and
VAO inherits it; ci/mainnet-envs-values.yaml keeps the plain path.

Bump validator to 0.9.0.
@devkoriel devkoriel added enhancement New feature or request validator labels Oct 24, 2026
@devkoriel devkoriel self-assigned this Oct 24, 2026
@devkoriel
devkoriel merged commit e886621 into main Oct 27, 2026
2 of 3 checks passed
@devkoriel
devkoriel deleted the sc-22327-validator-rpc-url-secret branch October 27, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request validator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants