Allow garbage collection to work against different API prefixes
The GC needs to build clients based only on Resource or Kind. Hoist the restmapper out of the controller and the clientpool, support a new ClientForGroupVersionKind and ClientForGroupVersionResource, and use the appropriate one in both places.
This commit is contained in:
@@ -274,7 +274,7 @@ func deleteAllContentForGroupVersionResource(
|
||||
glog.V(5).Infof("namespace controller - deleteAllContentForGroupVersionResource - estimate - namespace: %s, gvr: %v, estimate: %v", namespace, gvr, estimate)
|
||||
|
||||
// get a client for this group version...
|
||||
dynamicClient, err := clientPool.ClientForGroupVersion(gvr.GroupVersion())
|
||||
dynamicClient, err := clientPool.ClientForGroupVersionResource(gvr)
|
||||
if err != nil {
|
||||
glog.V(5).Infof("namespace controller - deleteAllContentForGroupVersionResource - unable to get client - namespace: %s, gvr: %v, err: %v", namespace, gvr, err)
|
||||
return estimate, err
|
||||
|
Reference in New Issue
Block a user