Skip to content

feat(installer): support templated install configs from vault#457

Open
schrodit wants to merge 2 commits into
mainfrom
config-template
Open

feat(installer): support templated install configs from vault#457
schrodit wants to merge 2 commits into
mainfrom
config-template

Conversation

@schrodit
Copy link
Copy Markdown
Member

@schrodit schrodit commented May 27, 2026

Summary

  • Add Go template rendering for install configs with dynamic {{ secret "..." }} lookups backed by prod.vault.yaml
    • I decided to not use a simple struct like {{ vault.mySecret.password }} because using a function make it more generic to support other stores like vault ehre secrets are rather fetched async.
  • Add a generic configtemplating package and a vault-backed installer secret store
    • The current vault is in a separate package to be able to switch the store with a different one e.g. openbao.
  • Support explicit vault path handling via oms install codesphere --vault
  • Render install configs to temporary 0600 files and warn when secrets.baseDir differs from the passed vault directory

Example

Use the newly added oms config template command to test it out locally.

# Example config.yaml fragment using secrets from prod.vault.yaml.
#
# Rendered by:
#   oms install codesphere --config config.yaml --vault prod.vault.yaml --priv-key age_key.txt ...
#
# Secret values are read dynamically from prod.vault.yaml and are not stored in
# plaintext in config.yaml.

secrets:
  baseDir: ./secrets

codesphere:
  override:
    global:
      license:
        key: '{{ secret "codesphereLicenseKey" }}'

postgres:
  override:
    auth:
      username: '{{ secret "postgresAdmin" "fields.username" }}'
      password: '{{ secret "postgresAdmin" "fields.password" }}'

@schrodit schrodit requested a review from joka134 May 27, 2026 20:29
@schrodit schrodit self-assigned this May 27, 2026
Render install config templates through a shared configtemplating package.

Add vault-backed secret lookup with explicit vault path handling for install and bootstrap flows.

Signed-off-by: Tim Schrodi <tim@codesphere.com>
Signed-off-by: schrodit <7979201+schrodit@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant