// when a pod is deleted gracefully it's deletion timestamp is first modified to reflect a grace period,
// when a pod is deleted gracefully it's 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
// 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 rs to create more replicas asap, not wait
// for modification of the deletion timestamp and expect an rs to create more replicas asap, not wait
// until the kubelet actually deletes the pod. This is different from the Phase of a pod changing, because
// until the kubelet actually deletes the pod. This is different from the Phase of a pod changing, because
// an rs never initiates a phase change, and so is never asleep waiting for the same.
// an rs never initiates a phase change, and so is never asleep waiting for the same.
glog.V(4).Infof("Update to pod %v with deletion timestamp %+v counted as delete for rs %v",curPod.Name,curPod.DeletionTimestamp,rsKey)
rsc.deletePod(curPod)
rsc.expectations.DeletionObserved(rsKey)
return
}else{
glog.V(4).Infof("Update to pod %v with deletion timestamp %+v. Not counting it as a new deletion for rs %v",curPod.Name,curPod.DeletionTimestamp,rsKey)
glog.V(4).Infof("Received new delete for rs %v, pod %v",rsKey,pod.Name)
rsc.expectations.DeletionObserved(rsKey)
}else{
glog.V(4).Infof("Received delete for rs %v pod %v with non nil deletion timestamp %+v. Not counting it as a new deletion.",rsKey,pod.Name,pod.DeletionTimestamp)
// when a pod is deleted gracefully it's deletion timestamp is first modified to reflect a grace period,
// when a pod is deleted gracefully it's 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
// 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 rc to create more replicas asap, not wait
// for modification of the deletion timestamp and expect an rc to create more replicas asap, not wait
// until the kubelet actually deletes the pod. This is different from the Phase of a pod changing, because
// until the kubelet actually deletes the pod. This is different from the Phase of a pod changing, because
// an rc never initiates a phase change, and so is never asleep waiting for the same.
// an rc never initiates a phase change, and so is never asleep waiting for the same.
glog.V(4).Infof("Update to pod %v with deletion timestamp %+v counted as delete for rc %v",curPod.Name,curPod.DeletionTimestamp,rcKey)
rm.deletePod(curPod)
rm.expectations.DeletionObserved(rcKey)
return
}else{
glog.V(4).Infof("Update to pod %v with deletion timestamp %+v. Not counting it as a new deletion for rc %v.",curPod.Name,curPod.DeletionTimestamp,rcKey)
}
}
rm.enqueueController(rc)
rm.enqueueController(rc)
// Only need to get the old controller if the labels changed.
// Only need to get the old controller if the labels changed.
glog.V(4).Infof("Received new delete for rc %v, pod %v",rcKey,pod.Name)
rm.expectations.DeletionObserved(rcKey)
}else{
glog.V(4).Infof("Received delete for rc %v pod %v with non nil deletion timestamp %+v. Not counting it as a new deletion.",rcKey,pod.Name,pod.DeletionTimestamp)