Skip to content

Commit af5378e

Browse files
cucxabongFxKu
andauthored
Mount additional volumes to 'postgres' container when 'targetContains` is an empty list (zalando#1475)
* Mount additional volumes to 'postgres' container when 'targetContainers' is an empty list Co-authored-by: Felix Kunde <[email protected]> Co-authored-by: Felix Kunde <[email protected]>
1 parent eeb59c5 commit af5378e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cluster/k8sres.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,7 @@ func (c *Cluster) addAdditionalVolumes(podSpec *v1.PodSpec,
14521452
continue
14531453
}
14541454

1455-
if v.TargetContainers == nil {
1455+
if len(v.TargetContainers) == 0 {
14561456
spiloContainer := podSpec.Containers[0]
14571457
additionalVolumes[i].TargetContainers = []string{spiloContainer.Name}
14581458
}

0 commit comments

Comments
 (0)