mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 23:44:28 +02:00
Allow specifying init_containers in Postgres CRD (#445)
* Add support for init_containers
This commit is contained in:
committed by
Sergey Dudoladov
parent
6f6a599c90
commit
3544cc90fa
@@ -410,6 +410,7 @@ func generatePodTemplate(
|
||||
namespace string,
|
||||
labels labels.Set,
|
||||
spiloContainer *v1.Container,
|
||||
initContainers []v1.Container,
|
||||
sidecarContainers []v1.Container,
|
||||
tolerationsSpec *[]v1.Toleration,
|
||||
nodeAffinity *v1.Affinity,
|
||||
@@ -428,6 +429,7 @@ func generatePodTemplate(
|
||||
ServiceAccountName: podServiceAccountName,
|
||||
TerminationGracePeriodSeconds: &terminateGracePeriodSeconds,
|
||||
Containers: containers,
|
||||
InitContainers: initContainers,
|
||||
Tolerations: *tolerationsSpec,
|
||||
}
|
||||
|
||||
@@ -803,6 +805,7 @@ func (c *Cluster) generateStatefulSet(spec *acidv1.PostgresSpec) (*v1beta1.State
|
||||
c.Namespace,
|
||||
c.labelsSet(true),
|
||||
spiloContainer,
|
||||
spec.InitContainers,
|
||||
sidecarContainers,
|
||||
&tolerationSpec,
|
||||
nodeAffinity(c.OpConfig.NodeReadinessLabel),
|
||||
|
||||
Reference in New Issue
Block a user