mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
Let GC print specific message for RESTMapping failure
This commit is contained in:
@@ -143,6 +143,12 @@ func (gc *GarbageCollector) attemptToDeleteWorker() bool {
|
||||
}
|
||||
err := gc.attemptToDeleteItem(n)
|
||||
if err != nil {
|
||||
// TODO: remove this block when gc starts using dynamic RESTMapper.
|
||||
if restMappingError, ok := err.(*restMappingError); ok {
|
||||
utilruntime.HandleError(fmt.Errorf("Ignore syncing item %#v: %s", n, restMappingError.Message()))
|
||||
// The RESTMapper is static, so no need to retry, otherwise we'll get the same error.
|
||||
return true
|
||||
}
|
||||
utilruntime.HandleError(fmt.Errorf("Error syncing item %#v: %v", n, err))
|
||||
// retry if garbage collection of an object failed.
|
||||
gc.attemptToDelete.AddRateLimited(item)
|
||||
|
||||
Reference in New Issue
Block a user