mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 17:24:14 +02:00
Mount additional volumes to 'postgres' container when 'targetContains` is an empty list (#1475)
* Mount additional volumes to 'postgres' container when 'targetContainers' is an empty list Co-authored-by: Felix Kunde <felix-kunde@gmx.de> Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
This commit is contained in:
co-authored by
Felix Kunde
parent
eeb59c5bfd
commit
af5378eea5
@@ -1452,7 +1452,7 @@ func (c *Cluster) addAdditionalVolumes(podSpec *v1.PodSpec,
|
||||
continue
|
||||
}
|
||||
|
||||
if v.TargetContainers == nil {
|
||||
if len(v.TargetContainers) == 0 {
|
||||
spiloContainer := podSpec.Containers[0]
|
||||
additionalVolumes[i].TargetContainers = []string{spiloContainer.Name}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user