Skip to content

Commit f97c665

Browse files
committed
fix to pooler TLS support, security context fsGroup added (zalando#2216)
1 parent 42e005f commit f97c665

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/cluster/connection_pooler.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,12 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) (
402402
},
403403
}
404404

405+
if spec.TLS != nil && spec.TLS.SecretName != "" && spec.SpiloFSGroup != nil {
406+
podTemplate.Spec.SecurityContext = &v1.PodSecurityContext{
407+
FSGroup: spec.SpiloFSGroup,
408+
}
409+
}
410+
405411
nodeAffinity := c.nodeAffinity(c.OpConfig.NodeReadinessLabel, spec.NodeAffinity)
406412
if c.OpConfig.EnablePodAntiAffinity {
407413
labelsSet := labels.Set(c.connectionPoolerLabels(role, false).MatchLabels)

0 commit comments

Comments
 (0)