mirror of https://github.com/k3s-io/k3s
Merge pull request #60289 from Pingan2017/imagegc
Automatic merge from submit-queue (batch tested with PRs 60346, 60135, 60289, 59643, 52640). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix freespace for image GC **What this PR does / why we need it**: use 'continue' in the loop instead of 'break' **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```pull/6/head
commit
5106ba31e3
|
@ -351,7 +351,7 @@ func (im *realImageGCManager) freeSpace(bytesToFree int64, freeTime time.Time) (
|
|||
// Images that are currently in used were given a newer lastUsed.
|
||||
if image.lastUsed.Equal(freeTime) || image.lastUsed.After(freeTime) {
|
||||
glog.V(5).Infof("Image ID %s has lastUsed=%v which is >= freeTime=%v, not eligible for garbage collection", image.id, image.lastUsed, freeTime)
|
||||
break
|
||||
continue
|
||||
}
|
||||
|
||||
// Avoid garbage collect the image if the image is not old enough.
|
||||
|
|
Loading…
Reference in New Issue