fix manifest and add more details to docs

This commit is contained in:
Felix Kunde 2020-03-31 10:34:47 +02:00
parent 72eac8a61f
commit 65144c202f
3 changed files with 20 additions and 16 deletions

View File

@ -17,8 +17,9 @@ pipelines with no access to Kubernetes directly.
* Rolling updates on Postgres cluster changes * Rolling updates on Postgres cluster changes
* Volume resize without Pod restarts * Volume resize without Pod restarts
* Database connection pooler
* Cloning Postgres clusters * Cloning Postgres clusters
* Logical Backups to S3 Bucket * Logical backups to S3 Bucket
* Standby cluster from S3 WAL archive * Standby cluster from S3 WAL archive
* Configurable for non-cloud environments * Configurable for non-cloud environments
* UI to create and edit Postgres cluster manifests * UI to create and edit Postgres cluster manifests

View File

@ -514,7 +514,7 @@ executed.
## Connection pooler ## Connection pooler
The operator can create a database side connection pooler for those applications, The operator can create a database side connection pooler for those applications
where an application side pooler is not feasible, but a number of connections is where an application side pooler is not feasible, but a number of connections is
high. To create a connection pooler together with a database, modify the high. To create a connection pooler together with a database, modify the
manifest: manifest:
@ -526,22 +526,21 @@ spec:
This will tell the operator to create a connection pooler with default This will tell the operator to create a connection pooler with default
configuration, through which one can access the master via a separate service configuration, through which one can access the master via a separate service
`{cluster-name}-pooler`. In most of the cases provided default configuration `{cluster-name}-pooler`. In most of the cases the
should be good enough. [default configuration](reference/operator_parameters.md#connection-pool-configuration)
should be good enough. To configure a new connection pooler individually for
To configure a new connection pooler, specify: each Postgres cluster, specify:
``` ```
spec: spec:
connectionPooler: connectionPooler:
# how many instances of connection pooler to create # how many instances of connection pooler to create
number_of_instances: 2 numberOfInstances: 2
# in which mode to run, session or transaction # in which mode to run, session or transaction
mode: "transaction" mode: "transaction"
# schema, which operator will create to install credentials lookup # schema, which operator will create to install credentials lookup function
# function
schema: "pooler" schema: "pooler"
# user, which operator will create for connection pooler # user, which operator will create for connection pooler
@ -557,13 +556,17 @@ spec:
memory: 100Mi memory: 100Mi
``` ```
By default `pgbouncer` is used to create a connection pooler. To find out about The `enableConnectionPooler` flag is not required when the `connectionPooler`
pooler modes see [docs](https://www.pgbouncer.org/config.html#pooler_mode) (but section is present in the manifest. But, it can be used to disable/remove the
it should be general approach between different implementation). pooler while keeping its configuration.
Note, that using `pgbouncer` means meaningful resource CPU limit should be less By default, `pgbouncer` is used as connection pooler. To find out about pooler
than 1 core (there is a way to utilize more than one, but in K8S it's easier modes read the `pgbouncer` [docs](https://www.pgbouncer.org/config.html#pooler_mode)
just to spin up more instances). (but it should be the general approach between different implementation).
Note, that using `pgbouncer` a meaningful resource CPU limit should be 1 core
or less (there is a way to utilize more than one, but in K8s it's easier just to
spin up more instances).
## Custom TLS certificates ## Custom TLS certificates

View File

@ -87,7 +87,7 @@ spec:
# - Sat:00:00-04:00 # - Sat:00:00-04:00
connectionPooler: connectionPooler:
number_of_instances: 2 numberOfInstances: 2
mode: "transaction" mode: "transaction"
schema: "pooler" schema: "pooler"
user: "pooler" user: "pooler"