Vault IaC: forgejo/firefly CNPG DB secret migration walkthrough #1517

Open
opened 2026-08-07 15:49:24 +00:00 by ginjiruu · 0 comments
Owner

forgejo/firefly CNPG DB secret migration — walkthrough doc

firefly and forgejo currently read their DB password from Vault keys (firefly-root-values / forgejo — values.yaml blobs), where a human has manually copied the CNPG-generated -app secret password.

Decision

Adopt the CNPG/ESO native integration (cloudnative-pg 1.30.0 docs: cncf-projects/external-secrets) — ESO Password generator owns the DB password, ExternalSecret with cnpg.io/reload: "true" keeps the CNPG secret in sync, PushSecret mirrors to Vault. This removes the manual copy and adds scheduled rotation.

But not yet. At the time the firefly/forgejo helm charts were set up they had busted chart configs and did not cleanly support a fromSecret-style interface — the secret part of the values file was stored in Vault and merged. Migrating needs a careful, chart-specific review.

Work items

  • Human review: verify how the current helm charts consume firefly-root-values / forgejo Vault keys and whether they now support existingSecret/fromSecret-style injection (or a per-key lookup).
  • Write a human-readable migration walkthrough covering: new Vault key layout, app ExternalSecret repoint, PushSecret wiring, the password rotation side-effects on the running DB, and rollback.
  • Execute the migration for forgejo and firefly only (no other CNPG clusters for now).
  • ADR 0003 (secret value ownership) — DB passwords owned by ESO via the CNPG/ESO pattern.
# forgejo/firefly CNPG DB secret migration — walkthrough doc firefly and forgejo currently read their DB password from Vault keys (`firefly-root-values` / `forgejo` — values.yaml blobs), where a human has manually copied the CNPG-generated `-app` secret password. ## Decision Adopt the **CNPG/ESO native integration** (cloudnative-pg 1.30.0 docs: cncf-projects/external-secrets) — ESO `Password` generator owns the DB password, `ExternalSecret` with `cnpg.io/reload: "true"` keeps the CNPG secret in sync, `PushSecret` mirrors to Vault. This removes the manual copy and adds scheduled rotation. **But not yet.** At the time the firefly/forgejo helm charts were set up they had busted chart configs and did not cleanly support a `fromSecret`-style interface — the secret part of the values file was stored in Vault and merged. Migrating needs a careful, chart-specific review. ## Work items - [ ] **Human review**: verify how the current helm charts consume `firefly-root-values` / `forgejo` Vault keys and whether they now support `existingSecret`/`fromSecret`-style injection (or a per-key lookup). - [ ] Write a **human-readable migration walkthrough** covering: new Vault key layout, app ExternalSecret repoint, PushSecret wiring, the password rotation side-effects on the running DB, and rollback. - [ ] Execute the migration for forgejo and firefly only (no other CNPG clusters for now). ## Related - ADR 0003 (secret value ownership) — DB passwords owned by ESO via the CNPG/ESO pattern.
ginjiruu added this to the Vault IaC milestone 2026-08-07 15:49:31 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab/clusters#1517
No description provided.