Skip to content

feat(agentgateway-bootstrap): provision CNPG Postgres for cost tracking - #305

Merged
Andy Lo-A-Foe (loafoe) merged 1 commit into
mainfrom
feat/agentgateway-bootstrap-postgres-cluster
Jul 23, 2026
Merged

feat(agentgateway-bootstrap): provision CNPG Postgres for cost tracking#305
Andy Lo-A-Foe (loafoe) merged 1 commit into
mainfrom
feat/agentgateway-bootstrap-postgres-cluster

Conversation

@loafoe

Copy link
Copy Markdown
Member

Summary

Adds a plain CNPG Cluster resource (no Crossplane, no external-secrets, no helm lookup) for agentgateway's request-logging database, which powers its cost dashboard
and Analytics UI. bootstrap.initdb.secret is deliberately left unset so CNPG
generates its own <name>-app Secret, which already includes a combined uri key
usable directly as agentgateway's database.url.

Wiring that uri value into AgentgatewayParameters.spec.rawConfig.database.url (a
static-only field with no secret-ref mechanism) requires a step that runs after the
Secret exists — a follow-up PR adds a Job for that. This PR is just the Cluster
resource and its values.

Test plan

  • helm template renders a Cluster with no bootstrap.initdb.secret field
  • database.enabled=false renders no Cluster at all
  • helm lint passes

agentgateway's request-logging database (powers its cost dashboard and
Analytics UI) needs a single database.url connection string in its
static config file, with no env-var or secret-ref support of any kind
(confirmed by reading agentgateway's own Rust source and JSON schema).

Provisions a plain CNPG Cluster directly (no Crossplane composite, no
external-secrets dependency, no helm lookup). Deliberately leaves
bootstrap.initdb.secret unset so CNPG generates its own <name>-app
Secret, which already includes a combined uri key in
postgresql://user:pass@host:port/dbname format (confirmed via CNPG's
own source, pkg/specs/secrets.go). A follow-up task adds a Job that
reads that key and patches it into AgentgatewayParameters once the
Secret exists - out of scope for this change.
@loafoe
Andy Lo-A-Foe (loafoe) requested a review from a team as a code owner July 23, 2026 13:27
@loafoe
Andy Lo-A-Foe (loafoe) merged commit 3831126 into main Jul 23, 2026
5 checks passed
@loafoe
Andy Lo-A-Foe (loafoe) deleted the feat/agentgateway-bootstrap-postgres-cluster branch July 23, 2026 13:34
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