Merge pull request #55259 from ironcladlou/gc-partial-discovery
Automatic merge from submit-queue. 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>. Tolerate partial discovery in garbage collector Allow the garbage collector to tolerate partial discovery failures. On a partial failure, use whatever was discovered, log the failures, and allow the resync logic to try again later. Fixes #55022. ```release-note API discovery failures no longer crash the kube controller manager via the garbage collector. ``` /cc @caesarxuchao
This commit is contained in:
@@ -233,10 +233,7 @@ func setup(t *testing.T, workerCount int) *testContext {
|
||||
discoveryClient := cacheddiscovery.NewMemCacheClient(clientSet.Discovery())
|
||||
restMapper := discovery.NewDeferredDiscoveryRESTMapper(discoveryClient, meta.InterfacesForUnstructured)
|
||||
restMapper.Reset()
|
||||
deletableResources, err := garbagecollector.GetDeletableResources(discoveryClient)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to get deletable resources: %v", err)
|
||||
}
|
||||
deletableResources := garbagecollector.GetDeletableResources(discoveryClient)
|
||||
config := *masterConfig
|
||||
config.ContentConfig = dynamic.ContentConfig()
|
||||
metaOnlyClientPool := dynamic.NewClientPool(&config, restMapper, dynamic.LegacyAPIPathResolverFunc)
|
||||
|
Reference in New Issue
Block a user