Skip to content

Conversation

@justgithubaccount
Copy link
Owner

Summary

  • Add Crunchy Data PostgreSQL Operator (PGO) v5.7.4 to DEV environment
  • Create PostgresCluster chat-db for chat-api with optimized configuration
  • Configure chat-api to use PGO-managed database secret

Changes

  1. PGO Operator (platform/infrastructure/database/pgo/base/)

    • ArgoCD Application with sync-wave 1
    • Deploys to postgres-operator namespace
  2. PostgresCluster (tenants/product-team/apps/chat/overlays/dev/postgres-cluster.yaml)

    • PostgreSQL 16, 10Gi storage on Longhorn
    • Optimized for 2GB RAM / 2 CPU
    • User: chatapi, Database: chat
  3. chat-api configuration

    • Uses PGO secret chat-db-pguser-chatapi
    • Maps uriDATABASE_URL via extraEnv

Dependencies

Test plan

  • PGO operator deploys successfully
  • PostgresCluster creates database and secret
  • chat-api connects to new database

🤖 Generated with Claude Code

justgithubaccount and others added 4 commits December 6, 2025 12:29
Add PGO operator as ArgoCD Application for managing PostgreSQL
clusters in Kubernetes. Deployed to postgres-operator namespace
with sync-wave 1.

- Helm chart: registry.developers.crunchydata.com/crunchydata/pgo
- Version: 5.7.4
- singleNamespace: false (manages all namespaces)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Create in-cluster PostgreSQL database for chat-api using PGO:
- PostgreSQL 16 with optimized configuration
- 10Gi data volume on Longhorn storage
- 5Gi backup volume for pgBackRest
- User: chatapi, Database: chat

PostgreSQL tuning for 2GB RAM / 2 CPU:
- max_connections: 150
- shared_buffers: 512MB
- effective_cache_size: 1536MB
- work_mem: 3495kB

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add PGO operator to dev cluster kustomization
- Update chat-api to use PGO-managed secret (chat-db-pguser-chatapi)
- Map PGO secret 'uri' key to DATABASE_URL via extraEnv
- Remove old postgree-secrets.yaml dependency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
PostgresCluster is a CRD from Crunchy Data PGO operator,
kubeconform doesn't have schema for it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@justgithubaccount justgithubaccount merged commit b977342 into main Dec 6, 2025
1 check passed
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.

2 participants