File tree 4 files changed +40
-20
lines changed
4 files changed +40
-20
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ type: application
15
15
# This is the chart version. This version number should be incremented each time you make changes
16
16
# to the chart and its templates, including the app version.
17
17
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18
- version : 1.1.1
18
+ version : 1.2.0
19
19
20
20
# This is the version number of the application being deployed. This version number should be
21
21
# incremented each time you make changes to the application. Versions are not expected to
Original file line number Diff line number Diff line change @@ -23,15 +23,15 @@ listen_port = 6432
23
23
; unix_socket_dir = var/run/postgresql
24
24
;unix_socket_mode = 0777
25
25
;unix_socket_group =
26
- ; client_tls_sslmode = disable
26
+ client_tls_sslmode = { { .Values.settings.tls.clientMode } }
27
27
;client_tls_ca_file = <system default >
28
28
;client_tls_key_file =
29
29
;client_tls_cert_file =
30
30
;client_tls_ciphers = fast
31
31
;client_tls_protocols = all
32
32
;client_tls_dheparams = auto
33
33
;client_tls_ecdhcurve = auto
34
- ; server_tls_sslmode = disable
34
+ server_tls_sslmode = { { .Values.settings.tls.serverMode } }
35
35
;server_tls_ca_file = <system default >
36
36
;server_tls_key_file =
37
37
;server_tls_cert_file =
@@ -41,9 +41,12 @@ listen_port = 6432
41
41
42
42
;;; Authentication settings
43
43
44
- auth_type = md5
45
- ;auth_file = /8.0/main/global/pg_auth
44
+ auth_type = { { .Values.settings.authType } }
45
+ { {- if and .Values.authFile.secretRef.name .Values.authFile.secretRef.key } }
46
46
auth_file = /etc/pgbouncer/userlist.txt
47
+ { {- else } }
48
+ ;auth_file =
49
+ { {- end } }
47
50
;auth_hba_file =
48
51
49
52
{ { .Values.settings.auth_query } }
Original file line number Diff line number Diff line change @@ -50,14 +50,16 @@ spec:
50
50
resources :
51
51
{{- toYaml .Values.resources | nindent 12 }}
52
52
volumeMounts :
53
- - name : userssecret
54
- mountPath : /etc/pgbouncer/userlist.txt
55
- subPath : {{ .Values.usersSecretRef.key }}
56
- readOnly : true
57
53
- name : config
58
54
mountPath : /etc/pgbouncer/pgbouncer.ini
59
55
subPath : pgbouncer.ini
60
56
readOnly : true
57
+ {{- if and .Values.authFile.secretRef.name .Values.authFile.secretRef.key }}
58
+ - name : auth-file
59
+ mountPath : /etc/pgbouncer/userlist.txt
60
+ subPath : {{ .Values.authFile.secretRef.key }}
61
+ readOnly : true
62
+ {{- end }}
61
63
lifecycle :
62
64
preStop :
63
65
exec :
@@ -99,15 +101,17 @@ spec:
99
101
{{- end }}
100
102
terminationGracePeriodSeconds : {{ .Values.terminationGracePeriodSeconds }}
101
103
volumes :
102
- - name : userssecret
103
- secret :
104
- secretName : {{ .Values.usersSecretRef.name }}
105
- items :
106
- - key : {{ .Values.usersSecretRef.key }}
107
- path : userlist.txt
108
104
- name : config
109
105
configMap :
110
106
name : {{ template "pgbouncer.fullname" . }}-config
111
107
items :
112
108
- key : pgbouncer.ini
113
109
path : pgbouncer.ini
110
+ {{- if and .Values.authFile.secretRef.name .Values.authFile.secretRef.key }}
111
+ - name : auth-file
112
+ secret :
113
+ secretName : {{ .Values.authFile.secretRef.name }}
114
+ items :
115
+ - key : {{ .Values.authFile.secretRef.key }}
116
+ path : userlist.txt
117
+ {{- end }}
Original file line number Diff line number Diff line change @@ -21,10 +21,15 @@ fullnameOverride: ""
21
21
22
22
podAnnotations : {}
23
23
24
+ # List of users written in key=value lines like:
25
+ # user1: settings
26
+ users : {}
27
+
24
28
# The secret containing the userlist.txt to deploy
25
- usersSecretRef :
26
- name : pgbouncer-conf-users
27
- key : userlist.txt
29
+ authFile :
30
+ secretRef :
31
+ name :
32
+ key :
28
33
29
34
databases :
30
35
# name:
@@ -34,8 +39,13 @@ databases:
34
39
# dbname:
35
40
36
41
settings :
42
+ authType : scram-sha-256
37
43
adminUsers : []
38
- statsUsers : [pgbouncer_exporter]
44
+ statsUsers : []
45
+
46
+ tls :
47
+ clientMode : disable
48
+ serverMode : require
39
49
40
50
poolMode : transaction
41
51
serverResetQuery : DISCARD ALL
@@ -67,8 +77,11 @@ settings:
67
77
# but will wait until all transactions end, or this amount of time
68
78
terminationGracePeriodSeconds : 120
69
79
80
+ # Sidecar configuration for prometheus exporter.
81
+ # This sidecar needs an additional user "pgbouncer_exporter" to be configured in
82
+ # the auth_file if enabled.
70
83
prometheusExporter :
71
- enabled : true
84
+ enabled : false
72
85
statsPgUser : pgbouncer_exporter
73
86
statsPgPasswordSecretRef :
74
87
name : pgbouncer-exporter-password
You can’t perform that action at this time.
0 commit comments