Don't remove all containers of deleted pods until sources are ready
Without this fix, kubelet may assume a pod from a not-ready source has already been deleted, and GC all its dead containers.
This commit is contained in:
@@ -133,8 +133,8 @@ func (r *Mock) GetNetNS(containerID ContainerID) (string, error) {
|
||||
return "", args.Error(0)
|
||||
}
|
||||
|
||||
func (r *Mock) GarbageCollect(gcPolicy ContainerGCPolicy) error {
|
||||
args := r.Called(gcPolicy)
|
||||
func (r *Mock) GarbageCollect(gcPolicy ContainerGCPolicy, ready bool) error {
|
||||
args := r.Called(gcPolicy, ready)
|
||||
return args.Error(0)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user