Skip to content

Commit

Permalink
Update Pgbouncer quickstart doc (#566)
Browse files Browse the repository at this point in the history
Signed-off-by: MobarakHsn <[email protected]>
  • Loading branch information
MobarakHsn authored Oct 13, 2023
1 parent 1c4a4d8 commit c9d49fc
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 174 deletions.
15 changes: 8 additions & 7 deletions docs/examples/pgbouncer/quickstart/pgbouncer-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ metadata:
name: pgbouncer-server
namespace: demo
spec:
version: "1.17.0"
version: "1.18.0"
replicas: 1
databases:
- alias: "postgres"
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
namespace: demo
- alias: "postgres"
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
namespace: demo
connectionPool:
port: 5432
maxClientConnections: 20
reservePoolSize: 5
terminationPolicy: WipeOut
terminationPolicy: Delete
19 changes: 3 additions & 16 deletions docs/guides/pgbouncer/concepts/pgbouncer.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,14 @@ metadata:
name: pgbouncer-server
namespace: demo
spec:
version: "1.17.0"
version: "1.18.0"
replicas: 2
databases:
- alias: "postgres"
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
namespace: demo
- alias: "tmpdb"
databaseName: "mydb"
databaseRef:
name: "quick-postgres"
namespace: demo
connectionPool:
maxClientConnections: 20
reservePoolSize: 5
Expand All @@ -62,7 +57,7 @@ spec:
`spec.version` is a required field that specifies the name of the [PgBouncerVersion](/docs/guides/pgbouncer/concepts/catalog.md) crd where the docker images are specified. Currently, when you install KubeDB, it creates the following `PgBouncerVersion` resources,

- `1.17.0`
- `1.18.0`

### spec.replicas

Expand All @@ -75,15 +70,10 @@ spec:
- `spec.databases.alias`: specifies an alias for the target database located in a postgres server specified by an appbinding.
- `spec.databases.databaseName`: specifies the name of the target database.
- `spec.databases.databaseRef`: specifies the name and namespace of the AppBinding that contains the path to a PostgreSQL server where the target database can be found.
- `spec.databases.databaseSecretRef` (optional): points to a secret that contains the credentials (username and password) of an existing user of this database. It is used to bind a single user to this specific database connection..

ConnectionPool is used to configure pgbouncer connection-pool. All the fields here are accompanied by default values and can be left unspecified if no customisation is required by the user.

- `spec.connectionPool.listenPort`: specifies the port on which pgbouncer should listen to connect with clients. The default is 5432.

- `spec.connectionPool.listenAddress`: specifies the adress from which pgbouncer should allow client connection from. The default is `*` (all addresses).

- `spec.connectionPool.adminUsers`: specifies the values of admin_users. Comma seperated names of admin users are listed here.
- `spec.connectionPool.port`: specifies the port on which pgbouncer should listen to connect with clients. The default is 5432.

- `spec.connectionPool.poolMode`: specifies the value of pool_mode. Specifies when a server connection can be reused by other clients.

Expand Down Expand Up @@ -145,9 +135,6 @@ ConnectionPool is used to configure pgbouncer connection-pool. All the fields he

- `spec.connectionPool.authType`: specifies how to authenticate users. PgBouncer supports several authentication methods including pam, md5, scram-sha-256, trust , or any. However hba, and cert are not supported.

- `spec.connectionPool.authUser`: looks up any user not specified in auth_file from pg_shadow.
Default: not set.

- `spec.connectionPool.IgnoreStartupParameters`: specifies comma-separated startup parameters that pgbouncer knows are handled by admin and it can ignore them.

### spec.monitor
Expand Down
Loading

0 comments on commit c9d49fc

Please sign in to comment.