Skip to content

Commit 1867d0e

Browse files
authored
docs(pgbouncer): add credentialsFromExistingSecret usage to Kubernete… (#7037)
Signed-off-by: germangarces <german.garces@flagsmith.com>
1 parent 7b37e2e commit 1867d0e

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

docs/docs/deployment-self-hosting/hosting-guides/kubernetes-openshift.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,24 @@ api:
343343

344344
### PgBouncer
345345

346-
By default, Flagsmith connects directly to the database - either in-cluster or external. You can enable PgBouncer with `pgbouncer.enabled: true` to have Flagsmith connect to PgBouncer, and zPgBouncer connect to the database.
346+
By default, Flagsmith connects directly to the database - either in-cluster or external. You can enable PgBouncer with `pgbouncer.enabled: true` to have Flagsmith connect to PgBouncer, and PgBouncer connect to the database.
347+
348+
If you use `databaseExternal.urlFromExistingSecret` to provide the database URL from a pre-existing Kubernetes secret, you must also provide PgBouncer's credentials via a separate existing secret using `pgbouncer.credentialsFromExistingSecret`. This is because Helm cannot read secret values at template time to parse the database URL into PgBouncer's required components.
349+
350+
```yaml
351+
pgbouncer:
352+
enabled: true
353+
credentialsFromExistingSecret:
354+
enabled: true
355+
name: my-pgbouncer-credentials # must contain POSTGRESQL_HOST, POSTGRESQL_DATABASE, POSTGRESQL_USER, POSTGRESQL_PASSWORD
356+
357+
databaseExternal:
358+
enabled: true
359+
urlFromExistingSecret:
360+
enabled: true
361+
name: my-db-url-secret # DATABASE_URL pointing through PgBouncer
362+
key: DATABASE_URL
363+
```
347364

348365
### All-in-one Docker image
349366

@@ -505,6 +522,8 @@ The following table lists the configurable parameters of the chart and their def
505522
| `influxdbExternal.tokenFromExistingSecret.enabled` | Use reference to a k8s secret not managed by this chart | `false` |
506523
| `influxdbExternal.tokenFromExistingSecret.name` | Referenced secret name | |
507524
| `influxdbExternal.tokenFromExistingSecret.key` | Key within the referenced secret to use | |
525+
| `pgbouncer.credentialsFromExistingSecret.enabled` | Use an existing secret for PgBouncer credentials instead of generating one. The secret must contain keys: `POSTGRESQL_HOST`, `POSTGRESQL_DATABASE`, `POSTGRESQL_USER`, `POSTGRESQL_PASSWORD`. | `false` |
526+
| `pgbouncer.credentialsFromExistingSecret.name` | Name of the existing secret containing PgBouncer credentials. | |
508527
| `pgbouncer.enabled` | | `false` |
509528
| `pgbouncer.image.repository` | | `bitnami/pgbouncer` |
510529
| `pgbouncer.image.tag` | | `1.16.0` |

0 commit comments

Comments
 (0)