@@ -17,7 +17,7 @@ metadata:
17
17
namespace : {{ .Release.Namespace }}
18
18
spec :
19
19
crVersion : {{ .Values.crVersion }}
20
- image : {{ include "pg-database.postgres-image" . }}
20
+ image : {{ .Values.image }}
21
21
imagePullPolicy : Always
22
22
port : {{ default 5432 .Values.port }}
23
23
postgresVersion : {{ .Values.postgresVersion }}
78
78
{{- range $option := $postgresCluster.options }}
79
79
- {{ $option }}
80
80
{{- end }}
81
+ {{- if $postgresCluster.tolerations }}
82
+ tolerations :
83
+ {{ $postgresCluster.tolerations | toYaml | indent 8 }}
84
+ {{- end }}
81
85
{{- end }}
82
86
{{- if $pgbackrest := $dataSource.pgbackrest }}
83
87
pgbackrest :
89
93
options :
90
94
{{- range $option := $pgbackrest.options }}
91
95
- {{ $option }}
96
+ {{- end }}
97
+ {{- if $pgbackrest.tolerations }}
98
+ tolerations :
99
+ {{ $pgbackrest.tolerations | toYaml | indent 8 }}
92
100
{{- end }}
93
101
repo :
94
102
name : {{ $pgbackrest.repo.name }}
@@ -107,6 +115,21 @@ spec:
107
115
container : {{ $azure.container }}
108
116
{{- end }}
109
117
{{- end }}
118
+ {{- if $volumes := $dataSource.volumes }}
119
+ volumes :
120
+ {{- if $pgDataVolume := $volumes.pgDataVolume }}
121
+ pgDataVolume :
122
+ {{ $pgDataVolume | toYaml | indent 8 }}
123
+ {{- end }}
124
+ {{- if $pgWALVolume := $volumes.pgWALVolume }}
125
+ pgWALVolume :
126
+ {{ $pgWALVolume | toYaml | indent 8 }}
127
+ {{- end }}
128
+ {{- if $pgBackRestVolume := $volumes.pgBackRestVolume }}
129
+ pgBackRestVolume :
130
+ {{ $pgBackRestVolume | toYaml | indent 8 }}
131
+ {{- end }}
132
+ {{- end }}
110
133
{{- end }}
111
134
112
135
{{- if .Values.expose }}
@@ -125,6 +148,22 @@ spec:
125
148
{{ .Values.expose.loadBalancerSourceRanges | toYaml | indent 6 }}
126
149
{{- end }}
127
150
{{- end }}
151
+ {{- if .Values.exposeReplicas }}
152
+ exposeReplicas :
153
+ type : {{ .Values.exposeReplicas.type }}
154
+ {{- if .Values.exposeReplicas.annotations }}
155
+ annotations :
156
+ {{ .Values.exposeReplicas.annotations | toYaml | indent 6 }}
157
+ {{- end }}
158
+ {{- if .Values.exposeReplicas.labels }}
159
+ labels :
160
+ {{ .Values.exposeReplicas.labels | toYaml | indent 6 }}
161
+ {{- end }}
162
+ {{- if .Values.exposeReplicas.loadBalancerSourceRanges }}
163
+ loadBalancerSourceRanges :
164
+ {{ .Values.exposeReplicas.loadBalancerSourceRanges | toYaml | indent 6 }}
165
+ {{- end }}
166
+ {{- end }}
128
167
129
168
instances :
130
169
{{- range $instance := .Values.instances }}
@@ -147,6 +186,20 @@ spec:
147
186
memory : {{ $instance.resources.limits.memory }}
148
187
{{- end }}
149
188
{{- end }}
189
+ {{- if $instance.containers }}
190
+ containers :
191
+ {{- if $instance.containers.replicaCertCopy }}
192
+ replicaCertCopy :
193
+ {{- if $instance.containers.replicaCertCopy.resources }}
194
+ resources :
195
+ {{- if $instance.containers.replicaCertCopy.resources.limits }}
196
+ limits :
197
+ cpu : {{ $instance.containers.replicaCertCopy.resources.limits.cpu }}
198
+ memory : {{ $instance.containers.replicaCertCopy.resources.limits.memory }}
199
+ {{- end }}
200
+ {{- end }}
201
+ {{- end }}
202
+ {{- end }}
150
203
{{- if $instance.sidecars }}
151
204
sidecars :
152
205
{{- range $sidecar := $instance.sidecars }}
@@ -177,6 +230,10 @@ spec:
177
230
{{- if $instance.priorityClassName }}
178
231
priorityClassName : {{ $instance.priorityClassName }}
179
232
{{- end }}
233
+ {{- if $instance.securityContext }}
234
+ securityContext :
235
+ {{ $instance.securityContext | toYaml | indent 8 }}
236
+ {{- end }}
180
237
181
238
{{- if $instance.walVolumeClaimSpec }}
182
239
walVolumeClaimSpec :
@@ -202,7 +259,7 @@ spec:
202
259
203
260
proxy :
204
261
pgBouncer :
205
- image : {{ include "pg-database.pgbouncer- image" . }}
262
+ image : {{ .Values.proxy.pgBouncer. image }}
206
263
replicas : {{ .Values.proxy.pgBouncer.replicas}}
207
264
exposeSuperusers : {{ .Values.proxy.pgBouncer.exposeSuperusers | default true }}
208
265
{{- if .Values.proxy.pgBouncer.resources }}
@@ -218,6 +275,20 @@ spec:
218
275
memory : {{ .Values.proxy.pgBouncer.resources.limits.memory }}
219
276
{{- end }}
220
277
{{- end }}
278
+ {{- if .Values.proxy.pgBouncer.containers }}
279
+ containers :
280
+ {{- if .Values.proxy.pgBouncer.containers.pgbouncerConfig }}
281
+ pgbouncerConfig :
282
+ {{- if .Values.proxy.pgBouncer.containers.pgbouncerConfig.resources }}
283
+ resources :
284
+ {{- if .Values.proxy.pgBouncer.containers.pgbouncerConfig.resources.limits }}
285
+ limits :
286
+ cpu : {{ .Values.proxy.pgBouncer.containers.pgbouncerConfig.resources.limits.cpu }}
287
+ memory : {{ .Values.proxy.pgBouncer.containers.pgbouncerConfig.resources.limits.memory }}
288
+ {{- end }}
289
+ {{- end }}
290
+ {{- end }}
291
+ {{- end }}
221
292
{{- if .Values.proxy.pgBouncer.expose }}
222
293
expose :
223
294
type : {{ .Values.proxy.pgBouncer.expose.type }}
@@ -273,6 +344,10 @@ spec:
273
344
operator : {{ .Values.proxy.pgBouncer.tolerations.operator }}
274
345
value : {{ .Values.proxy.pgBouncer.tolerations.value }}
275
346
{{- end }}
347
+ {{- if .Values.proxy.pgBouncer.securityContext }}
348
+ securityContext :
349
+ {{ .Values.proxy.pgBouncer.securityContext | toYaml | indent 8 }}
350
+ {{- end }}
276
351
277
352
pmm :
278
353
enabled : {{ .Values.pmm.enabled }}
@@ -282,11 +357,36 @@ spec:
282
357
283
358
backups :
284
359
pgbackrest :
285
- image : {{ include "pg-database.backup-image" . }}
360
+ image : {{ .Values.backups.pgbackrest.image }}
286
361
{{- if .Values.backups.pgbackrest.configuration }}
287
362
configuration :
288
363
{{ .Values.backups.pgbackrest.configuration | toYaml | indent 6 }}
289
364
{{- end }}
365
+ {{- if .Values.backups.pgbackrest.containers }}
366
+ containers :
367
+ {{- if .Values.backups.pgbackrest.containers.pgbackrest }}
368
+ pgbackrest :
369
+ {{- if .Values.backups.pgbackrest.containers.pgbackrest.resources }}
370
+ resources :
371
+ {{- if .Values.backups.pgbackrest.containers.pgbackrest.resources.limits }}
372
+ limits :
373
+ cpu : {{ .Values.backups.pgbackrest.containers.pgbackrest.resources.limits.cpu }}
374
+ memory : {{ .Values.backups.pgbackrest.containers.pgbackrest.resources.limits.memory }}
375
+ {{- end }}
376
+ {{- end }}
377
+ {{- end }}
378
+ {{- if .Values.backups.pgbackrest.containers.pgbackrestConfig }}
379
+ pgbackrestConfig :
380
+ {{- if .Values.backups.pgbackrest.containers.pgbackrestConfig.resources }}
381
+ resources :
382
+ {{- if .Values.backups.pgbackrest.containers.pgbackrestConfig.resources.limits }}
383
+ limits :
384
+ cpu : {{ .Values.backups.pgbackrest.containers.pgbackrestConfig.resources.limits.cpu }}
385
+ memory : {{ .Values.backups.pgbackrest.containers.pgbackrestConfig.resources.limits.memory }}
386
+ {{- end }}
387
+ {{- end }}
388
+ {{- end }}
389
+ {{- end }}
290
390
{{- if .Values.backups.pgbackrest.jobs }}
291
391
jobs :
292
392
priorityClassName : {{ .Values.backups.pgbackrest.jobs.priorityClassName }}
@@ -301,6 +401,10 @@ spec:
301
401
operator : {{ .Values.backups.pgbackrest.jobs.tolerations.operator }}
302
402
value : {{ .Values.backups.pgbackrest.jobs.tolerations.value }}
303
403
{{- end }}
404
+ {{- if .Values.backups.pgbackrest.jobs.securityContext }}
405
+ securityContext :
406
+ {{ .Values.backups.pgbackrest.jobs.securityContext | toYaml | indent 10 }}
407
+ {{- end }}
304
408
{{- end }}
305
409
{{- if .Values.backups.pgbackrest.global }}
306
410
global :
@@ -324,6 +428,14 @@ spec:
324
428
affinity :
325
429
{{ .Values.backups.pgbackrest.repoHost.affinity | toYaml | indent 10 }}
326
430
{{- end }}
431
+ {{- if .Values.backups.pgbackrest.repoHost.tolerations }}
432
+ tolerations :
433
+ {{ .Values.backups.pgbackrest.repoHost.tolerations | toYaml | indent 10 }}
434
+ {{- end }}
435
+ {{- if .Values.backups.pgbackrest.repoHost.securityContext }}
436
+ securityContext :
437
+ {{ .Values.backups.pgbackrest.repoHost.securityContext | toYaml | indent 10 }}
438
+ {{- end }}
327
439
{{- end }}
328
440
manual :
329
441
repoName : repo1
@@ -371,9 +483,23 @@ spec:
371
483
container : {{ $azure.container }}
372
484
{{- end }}
373
485
{{- end }}
486
+ {{- if .Values.backups.pgbackrest.restore }}
487
+ restore :
488
+ repoName : {{ .Values.backups.pgbackrest.restore.repoName }}
489
+ {{- if .Values.backups.pgbackrest.restore.tolerations }}
490
+ tolerations :
491
+ {{ .Values.backups.pgbackrest.restore.tolerations | toYaml | indent 10 }}
492
+ {{- end }}
493
+ {{- end }}
374
494
375
495
{{- if .Values.patroni }}
376
496
patroni :
497
+ {{- if .Values.patroni.syncPeriodSeconds }}
498
+ syncPeriodSeconds : {{ .Values.patroni.syncPeriodSeconds }}
499
+ {{- end }}
500
+ {{- if .Values.patroni.leaderLeaseDurationSeconds }}
501
+ leaderLeaseDurationSeconds : {{ .Values.patroni.leaderLeaseDurationSeconds }}
502
+ {{- end }}
377
503
dynamicConfiguration :
378
504
postgresql :
379
505
parameters :
@@ -403,6 +529,9 @@ spec:
403
529
{{- if .Values.extensions.storage.region }}
404
530
region : {{ .Values.extensions.storage.region }}
405
531
{{- end }}
532
+ {{- if .Values.extensions.storage.endpoint }}
533
+ endpoint : {{ .Values.extensions.storage.endpoint }}
534
+ {{- end }}
406
535
{{- if .Values.extensions.storage.secret.name }}
407
536
secret :
408
537
name : {{ .Values.extensions.storage.secret.name }}
0 commit comments