mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-18 15:27:58 +02:00
Connection pooler for replica (#1127)
* Enable connection pooler for replica * Refactor code for connection pooler - Move all the relevant code to a separate file - Move all the related tests to a separate file - Avoid using cluster where not required - Simplify the logic in sync and other methods - Cleanup of duplicated or unused code * Fix labels for the replica pods * Update deleteConnectionPooler to include role * Adding test cases and other changes - Fix unit test and delete secret when required only - Make sure we use empty fresh cluster for every test case. * enhance e2e test * Disable pooler in complete manifest as this is source for e2e too an creates unnecessary pooler setups. Co-authored-by: Rafia Sabih <rafia.sabih@zalando.de> Co-authored-by: Jan Mussler <janm81@gmail.com>
This commit is contained in:
co-authored by
Rafia Sabih
Jan Mussler
parent
3fed565328
commit
49158ecb68
@@ -18,7 +18,8 @@ spec:
|
||||
- createdb
|
||||
enableMasterLoadBalancer: false
|
||||
enableReplicaLoadBalancer: false
|
||||
# enableConnectionPooler: true # not needed when connectionPooler section is present (see below)
|
||||
enableConnectionPooler: false # enable/disable connection pooler deployment
|
||||
enableReplicaConnectionPooler: false # set to enable connectionPooler for replica service
|
||||
allowedSourceRanges: # load balancers' source ranges for both master and replica services
|
||||
- 127.0.0.1/32
|
||||
databases:
|
||||
@@ -126,18 +127,19 @@ spec:
|
||||
# - 01:00-06:00 #UTC
|
||||
# - Sat:00:00-04:00
|
||||
|
||||
connectionPooler:
|
||||
numberOfInstances: 2
|
||||
mode: "transaction"
|
||||
schema: "pooler"
|
||||
user: "pooler"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 300m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 100Mi
|
||||
# overwrite custom properties for connection pooler deployments
|
||||
# connectionPooler:
|
||||
# numberOfInstances: 2
|
||||
# mode: "transaction"
|
||||
# schema: "pooler"
|
||||
# user: "pooler"
|
||||
# resources:
|
||||
# requests:
|
||||
# cpu: 300m
|
||||
# memory: 100Mi
|
||||
# limits:
|
||||
# cpu: "1"
|
||||
# memory: 100Mi
|
||||
|
||||
initContainers:
|
||||
- name: date
|
||||
|
||||
@@ -186,6 +186,8 @@ spec:
|
||||
type: string
|
||||
enableConnectionPooler:
|
||||
type: boolean
|
||||
enableReplicaConnectionPooler:
|
||||
type: boolean
|
||||
enableLogicalBackup:
|
||||
type: boolean
|
||||
enableMasterLoadBalancer:
|
||||
|
||||
Reference in New Issue
Block a user