mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-12-07 09:43:15 +00:00
Merge pull request #24647 from yifan-gu/rkt_gc
Automatic merge from submit-queue rkt: Refactor GarbageCollect to enforce GCPolicy. Previously, we uses `rkt gc` to garbage collect dead pods, which is very coarse, and can cause the dead pods to be removed too aggressively. This PR improves the garbage collection, now after one GC iteration: - The deleted pods will be removed. - If the number of containers exceeds gcPolicy.MaxContainers, then containers whose ages are older than gcPolicy.minAge will be removed. cc @kubernetes/sig-node @euank @sjpotter Pending on #23887 for the Godep updates. <!-- Reviewable:start --> --- This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24647) <!-- Reviewable:end -->
This commit is contained in:
@@ -230,7 +230,7 @@ func startComponents(firstManifestURL, secondManifestURL string) (string, string
|
||||
cadvisorInterface,
|
||||
configFilePath,
|
||||
nil,
|
||||
containertest.FakeOS{},
|
||||
&containertest.FakeOS{},
|
||||
1*time.Second, /* FileCheckFrequency */
|
||||
1*time.Second, /* HTTPCheckFrequency */
|
||||
10*time.Second, /* MinimumGCAge */
|
||||
@@ -263,7 +263,7 @@ func startComponents(firstManifestURL, secondManifestURL string) (string, string
|
||||
cadvisorInterface,
|
||||
"",
|
||||
nil,
|
||||
containertest.FakeOS{},
|
||||
&containertest.FakeOS{},
|
||||
1*time.Second, /* FileCheckFrequency */
|
||||
1*time.Second, /* HTTPCheckFrequency */
|
||||
10*time.Second, /* MinimumGCAge */
|
||||
|
||||
Reference in New Issue
Block a user