Skip to content

Commit 468d9c2

Browse files
committed
add environment variable of CA cert path in pooler pod template
1 parent f97c665 commit 468d9c2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/cluster/connection_pooler.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,16 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) (
348348
// Env vars
349349
crtFile := spec.TLS.CertificateFile
350350
keyFile := spec.TLS.PrivateKeyFile
351+
caFile := spec.TLS.CAFile
351352
if crtFile == "" {
352353
crtFile = "tls.crt"
353354
}
354355
if keyFile == "" {
355356
keyFile = "tls.key"
356357
}
358+
if caFile == "" {
359+
keyFile = "ca.crt"
360+
}
357361

358362
envVars = append(
359363
envVars,
@@ -363,6 +367,9 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) (
363367
v1.EnvVar{
364368
Name: "CONNECTION_POOLER_CLIENT_TLS_KEY", Value: filepath.Join("/tls", keyFile),
365369
},
370+
v1.EnvVar{
371+
Name: "CONNECTION_POOLER_CLIENT_CA_FILE", Value: filepath.Join("/tls", caFile),
372+
},
366373
)
367374

368375
// Volume

0 commit comments

Comments
 (0)