Skip to content

feat: provision per-service databases for FuzeSales, FuzeContact, FuzeService #153

Description

@izzywdev

@claude

Provision per-service Postgres databases and roles on the shared FuzeInfra Postgres instance for three new platform services. This must be fully automated — no manual steps.

What needs to be done

For each service (fuzesales, fuzecontact, fuzeservice), create:

  1. A Postgres role/user: <svc>_svc with the password below
  2. A Postgres database owned by that role: <svc>
  3. Grant all privileges on the database to the role

Connection details

  • Postgres host: fuzeinfra-postgres.fuzeinfra.svc.cluster.local:5432
  • Admin credentials: from the fuzeinfra-postgres-admin secret in the fuzeinfra namespace

Per-service credentials (already sealed into SealedSecrets in each repo)

These passwords are already sealed — you don't need to store them, just use them to provision:

  • fuzesales_svc user password: already in SealedSecret/fuzesales-db-credentials in namespace fuzesales
  • fuzecontact_svc user password: already in SealedSecret/fuzecontact-db-credentials in namespace fuzecontact
  • fuzeservice_svc user password: already in SealedSecret/fuzeservice-db-credentials in namespace fuzeservice

The provisioning Job pattern should match any existing *-db-bootstrap Jobs in FuzeInfra. The Job runs as a Helm pre-install hook that:

  1. Reads the admin password from fuzeinfra-postgres-admin secret
  2. Creates the DB user + database idempotently (skip if already exists)
  3. The jobs deploy into each service's namespace (fuzesales, fuzecontact, fuzeservice) — these namespaces already exist in the cluster

Acceptance criteria

  • All three databases exist on the FuzeInfra Postgres instance
  • Each service can connect using DATABASE_URL from its SealedSecret
  • Provisioning is idempotent (re-running does not fail)
  • Implemented as Helm pre-install Jobs or a FuzeInfra bootstrap mechanism (not one-off kubectl commands)

Context

These services are being deployed as hosted micro-frontends inside FuzeFront. Their Helm charts are in:

  • github.com/izzywdev/FuzeSaleshelm/fuzesales/
  • github.com/izzywdev/FuzeContacthelm/fuzecontact/
  • github.com/izzywdev/FuzeServicehelm/fuzeservice/

The SealedSecrets referencing these databases are already committed to the feature/devops-*-impl branches of each repo.

STATE: { done: [], remaining: ["provision fuzesales DB+role", "provision fuzecontact DB+role", "provision fuzeservice DB+role"], decisions: [] }

@claude please implement this and reply with the PR link when done.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions