mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 22:41:35 +02:00
set allowPrivilegeEscalation for deployment templates (#1328)
* set allowPrivilegeEscalation for deployment templates * securityContext of container, not pod * aligning * default service account for pooler
This commit is contained in:
@@ -280,6 +280,9 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) (
|
||||
},
|
||||
},
|
||||
},
|
||||
SecurityContext: &v1.SecurityContext{
|
||||
AllowPrivilegeEscalation: util.False(),
|
||||
},
|
||||
}
|
||||
|
||||
podTemplate := &v1.PodTemplateSpec{
|
||||
@@ -289,7 +292,6 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) (
|
||||
Annotations: c.annotationsSet(c.generatePodAnnotations(spec)),
|
||||
},
|
||||
Spec: v1.PodSpec{
|
||||
ServiceAccountName: c.OpConfig.PodServiceAccountName,
|
||||
TerminationGracePeriodSeconds: &gracePeriod,
|
||||
Containers: []v1.Container{poolerContainer},
|
||||
// TODO: add tolerations to scheduler pooler on the same node
|
||||
|
||||
Reference in New Issue
Block a user