Skip to content

Commit 7f00388

Browse files
committed
Ensure the StatefulSet controller has observed the latest generation.
Signed-off-by: Michael Montgomery <[email protected]>
1 parent 3e95b2d commit 7f00388

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/controller/elasticsearch/driver/upscale.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,12 @@ func findPendingNonMasterStatefulSetUpgrades(
338338
continue
339339
}
340340

341+
if actualStatefulSet.Status.ObservedGeneration < actualStatefulSet.Generation {
342+
// The StatefulSet controller has not yet observed the latest generation.
343+
pendingNonMasterSTS = append(pendingNonMasterSTS, actualStatefulSet)
344+
continue
345+
}
346+
341347
// Check if this StatefulSet has pending updates
342348
if actualStatefulSet.Status.UpdatedReplicas != actualStatefulSet.Status.Replicas {
343349
pendingNonMasterSTS = append(pendingNonMasterSTS, actualStatefulSet)

0 commit comments

Comments
 (0)