mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-09 00:34:10 -04:00
fix daemon set rolling update hang
This commit is contained in:
parent
6897c68de5
commit
e25ff463ba
1 changed files with 9 additions and 0 deletions
|
|
@ -535,6 +535,15 @@ func (dsc *DaemonSetsController) updatePod(old, cur interface{}) {
|
|||
return
|
||||
}
|
||||
|
||||
if curPod.DeletionTimestamp != nil {
|
||||
// when a pod is deleted gracefully its deletion timestamp is first modified to reflect a grace period,
|
||||
// and after such time has passed, the kubelet actually deletes it from the store. We receive an update
|
||||
// for modification of the deletion timestamp and expect an ds to create more replicas asap, not wait
|
||||
// until the kubelet actually deletes the pod.
|
||||
dsc.deletePod(curPod)
|
||||
return
|
||||
}
|
||||
|
||||
curControllerRef := metav1.GetControllerOf(curPod)
|
||||
oldControllerRef := metav1.GetControllerOf(oldPod)
|
||||
controllerRefChanged := !reflect.DeepEqual(curControllerRef, oldControllerRef)
|
||||
|
|
|
|||
Loading…
Reference in a new issue