Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Pgbouncer quickstart doc #566

Merged
merged 2 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading