-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Problem
The chart currently supports external Redis via the redis.external.enabled configuration, which disables the creation of an internal Redis StatefulSet. However, there is no equivalent configuration for PostgreSQL.
When using an external PostgreSQL database (e.g., AWS Aurora, Cloud SQL), LGP custom resources created by LangSmith deployments still have spec.database.enabled: true, which causes the operator to create internal PostgreSQL StatefulSets that cannot start due to missing storage class configuration or are simply redundant.
This results in:
- Permanently pending pods consuming scheduler resources
- Unnecessary PVC creation attempts
- Confusion about which database is actually being used
Current Behavior
# values.yaml - Redis has external support
redis:
external:
enabled: true
existingSecretName: "my-redis-secret"
connectionUrlSecretKey: "REDIS_URI_CUSTOM"
# No equivalent for database
# database.external does not existWhen external postgres credentials are provided via POSTGRES_URI_CUSTOM in deployment secrets, the operator still creates an internal postgres StatefulSet if the LGP CR has database.enabled: true.
Expected Behavior
The chart should provide a database.external configuration option similar to redis.external:
database:
external:
enabled: false # Set to true when using external postgres
existingSecretName: ""
connectionUrlSecretKey: "POSTGRES_URI_CUSTOM"When database.external.enabled: true, the chart/operator should:
- Not create internal PostgreSQL StatefulSets
- Optionally override LGP CR
database.enabledsettings (similar to how redis is handled) - Use the external connection string from the specified secret
Proposed Solution
Add a database.external configuration section to values.yaml that mirrors the existing redis.external structure:
database:
name: "postgres"
containerPort: 5432
external:
# -- Whether to use an external PostgreSQL instance. This will disable the
# creation of a postgres stateful-set and service.
enabled: false
connectionUrl: ""
connectionUrlSecretKey: "connection_url"
existingSecretName: ""Use Case
We're deploying LangGraph Platform in a hybrid environment with:
- External AWS Aurora PostgreSQL (managed separately via Terraform)
- External AWS ElastiCache Redis (managed separately via Terraform)
- LangSmith Cloud creating LGP deployments via API
Currently, even though we provide POSTGRES_URI_CUSTOM in our deployment secrets, we end up with stuck pods because LangSmith sets database.enabled: true in the LGP CR.
Additional Context
- Chart version: 0.2.14
- This would provide feature parity with the existing
redis.externalconfiguration - Production environments often use managed database services rather than in-cluster postgres
- The
operator.templates.dbtemplate is always available but there's no chart-level way to prevent its use