File tree Expand file tree Collapse file tree 4 files changed +48
-18
lines changed
manifests/components/pgbouncer Expand file tree Collapse file tree 4 files changed +48
-18
lines changed Original file line number Diff line number Diff line change 19
19
image : bitnami/pgbouncer:latest
20
20
envFrom :
21
21
- configMapRef :
22
- name : pgbouncer
22
+ name : pgbouncer-bitnami
23
23
- secretRef :
24
- name : pgbouncer
24
+ name : pgbouncer-bitnami
25
25
ports :
26
26
- containerPort : 5432
27
27
name : session-prt
@@ -31,13 +31,20 @@ spec:
31
31
cpu : 50m
32
32
memory : 50Mi
33
33
volumeMounts :
34
- - name : auth-file
35
- mountPath : /etc /pgbouncer/auth_file
34
+ - name : config-vol
35
+ mountPath : /bitnami /pgbouncer/conf/
36
36
readOnly : true
37
37
volumes :
38
- - name : auth-file
39
- secret :
40
- secretName : auth-file
38
+ - name : config-vol # cannot name it to 'config' or kubernetes will not be able to find it.
39
+ projected :
40
+ sources :
41
+ - configMap :
42
+ name : pgbouncer
43
+ - secret :
44
+ name : pgbouncer
45
+ items :
46
+ - key : auth_file
47
+ path : userlist.txt
41
48
# assign pods to nodes with the postgres primary
42
49
affinity :
43
50
podAffinity :
Original file line number Diff line number Diff line change @@ -7,16 +7,21 @@ resources:
7
7
8
8
configMapGenerator :
9
9
- name : pgbouncer
10
+ files :
11
+ - pgbouncer.ini
12
+ # The bitnami pgbouncer image requires some environment variables to work, although they are overridden by the config file
13
+ - name : pgbouncer-bitnami
10
14
envs :
11
15
- params.env
12
16
13
17
secretGenerator :
14
18
- name : pgbouncer
15
- envs :
16
- - secret-params.env
17
- - name : auth-file
18
19
files :
19
20
- auth_file
21
+ # The bitnami pgbouncer image requires some environment variables to work, although they are overridden by the config file
22
+ - name : pgbouncer-bitnami
23
+ envs :
24
+ - secret-params.env
20
25
21
26
images :
22
27
- name : bitnami/pgbouncer
Original file line number Diff line number Diff line change 1
1
POSTGRESQL_HOST = postgres.postgres-shared.svc.cluster.local
2
2
PGBOUNCER_PORT = 5432
3
- PGBOUNCER_DEFAULT_POOL_SIZE = 100
4
- PGBOUNCER_MAX_CLIENT_CONN = 100
5
- PGBOUNCER_POOL_MODE = session
6
- PGBOUNCER_IGNORE_STARTUP_PARAMETERS = extra_float_digits,search_path
7
- # PgBouncer exposed database. This is the database that clients can connect to.
8
- PGBOUNCER_DATABASE = chatbot
9
- PGBOUNCER_AUTH_USER = chatbot
10
- PGBOUNCER_AUTH_TYPE = scram-sha-256
Original file line number Diff line number Diff line change
1
+ ; This file is modified on a base generated by <https://hub.docker.com/r/bitnami/pgbouncer>
2
+ ; The source code of the base image can be found at <https://github.com/bitnami/containers/tree/main/bitnami/pgbouncer>
3
+
4
+ [databases]
5
+ chatbot = host =postgres.postgres-shared.svc.cluster.local port =5432 dbname =chatbot auth_user =chatbot pool_size =200
6
+ chatbot-standby = host =postgres-replica.postgres-shared.svc.cluster.local port =5432 dbname =chatbot auth_user =chatbot pool_size =200
7
+ * = host =postgres.postgres-shared.svc.cluster.local
8
+
9
+ [pgbouncer]
10
+ listen_port =5432
11
+ listen_addr =0.0.0.0
12
+ unix_socket_dir =/tmp/
13
+ unix_socket_mode =0777
14
+ auth_file =/opt/bitnami/pgbouncer/conf/userlist.txt
15
+ auth_type =scram-sha-256
16
+ pidfile =/opt/bitnami/pgbouncer/tmp/pgbouncer.pid
17
+ admin_users =chatbot
18
+ client_tls_sslmode =disable
19
+ server_tls_sslmode =disable
20
+ pool_mode =session
21
+ max_client_conn =400
22
+ default_pool_size =100
23
+ ignore_startup_parameters =extra_float_digits
24
+ stats_period =60
25
+ server_round_robin =0
26
+ server_fast_close =0
You can’t perform that action at this time.
0 commit comments