Skip to content

Commit 7b3fce3

Browse files
hzyfoxFillZpp
authored andcommitted
fix #844 When updating statefullset, the total number of pods being updated may exceed the expected value (#845)
Signed-off-by: 孤月 <[email protected]>
1 parent a9c8661 commit 7b3fce3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/controller/statefulset/stateful_set_control.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -858,10 +858,10 @@ func (ssc *defaultStatefulSetControl) inPlaceUpdatePod(
858858
}
859859

860860
if res.UpdateErr == nil {
861+
updateExpectations.ExpectUpdated(getStatefulSetKey(set), updateRevision.Name, pod)
861862
ssc.recorder.Eventf(set, v1.EventTypeNormal, "SuccessfulUpdatePodInPlace", "successfully update pod %s in-place(revision %v)", pod.Name, updateRevision.Name)
862863
return res.InPlaceUpdate, nil
863864
}
864-
865865
ssc.recorder.Eventf(set, v1.EventTypeWarning, "FailedUpdatePodInPlace", "failed to update pod %s in-place(revision %v): %v", pod.Name, updateRevision.Name, res.UpdateErr)
866866
return res.InPlaceUpdate, res.UpdateErr
867867
}

0 commit comments

Comments
 (0)