pick first container if postgres is not found (#1505)

* pick first container if postgres is not found

* minor change
This commit is contained in:
Felix Kunde
2021-05-28 11:44:10 +02:00
committed by GitHub
parent 7884af2d59
commit dd9c3907b7
6 changed files with 45 additions and 36 deletions
+2 -2
View File
@@ -357,8 +357,8 @@ func (c *Cluster) syncStatefulSet() error {
// and
// (b) some of the pods were not restarted when the lazy update was still in place
for _, pod := range pods {
effectivePodImage := c.getPostgresContainer(&pod.Spec).Image
stsImage := c.getPostgresContainer(&desiredSts.Spec.Template.Spec).Image
effectivePodImage := getPostgresContainer(&pod.Spec).Image
stsImage := getPostgresContainer(&desiredSts.Spec.Template.Spec).Image
if stsImage != effectivePodImage {
if err = c.markRollingUpdateFlagForPod(&pod, "pod not yet restarted due to lazy update"); err != nil {