mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-19 02:48:39 +02:00
get postgres container by name, not index (#1504)
This commit is contained in:
+2
-2
@@ -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 := pod.Spec.Containers[0].Image
|
||||
stsImage := desiredSts.Spec.Template.Spec.Containers[0].Image
|
||||
effectivePodImage := c.getPostgresContainer(&pod.Spec).Image
|
||||
stsImage := c.getPostgresContainer(&desiredSts.Spec.Template.Spec).Image
|
||||
|
||||
if stsImage != effectivePodImage {
|
||||
if err = c.markRollingUpdateFlagForPod(&pod, "pod not yet restarted due to lazy update"); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user