diff --git a/pkg/controller/garbagecollector/garbagecollector.go b/pkg/controller/garbagecollector/garbagecollector.go index fe05899fb20..e79b7e43bb1 100644 --- a/pkg/controller/garbagecollector/garbagecollector.go +++ b/pkg/controller/garbagecollector/garbagecollector.go @@ -478,7 +478,8 @@ func (gc *GarbageCollector) monitorFor(resource unversioned.GroupVersionResource if err != nil { return monitor, err } - gc.registeredRateLimiterForMonitors.registerIfNotPresent(resource.GroupVersion(), client, "garbage_collector_monitoring") + // TODO: remove the comment when we find an efficient way to do locking + // gc.registeredRateLimiterForMonitors.registerIfNotPresent(resource.GroupVersion(), client, "garbage_collector_monitoring") setObjectTypeMeta := func(obj interface{}) { runtimeObject, ok := obj.(runtime.Object) if !ok { @@ -603,7 +604,8 @@ func (gc *GarbageCollector) apiResource(apiVersion, kind string, namespaced bool func (gc *GarbageCollector) deleteObject(item objectReference) error { fqKind := unversioned.FromAPIVersionAndKind(item.APIVersion, item.Kind) client, err := gc.clientPool.ClientForGroupVersion(fqKind.GroupVersion()) - gc.registeredRateLimiter.registerIfNotPresent(fqKind.GroupVersion(), client, "garbage_collector_operation") + // TODO: remove the comment when we find an efficient way to do locking + // gc.registeredRateLimiter.registerIfNotPresent(fqKind.GroupVersion(), client, "garbage_collector_operation") resource, err := gc.apiResource(item.APIVersion, item.Kind, len(item.Namespace) != 0) if err != nil { return err @@ -617,7 +619,8 @@ func (gc *GarbageCollector) deleteObject(item objectReference) error { func (gc *GarbageCollector) getObject(item objectReference) (*runtime.Unstructured, error) { fqKind := unversioned.FromAPIVersionAndKind(item.APIVersion, item.Kind) client, err := gc.clientPool.ClientForGroupVersion(fqKind.GroupVersion()) - gc.registeredRateLimiter.registerIfNotPresent(fqKind.GroupVersion(), client, "garbage_collector_operation") + // TODO: remove the comment when we find an efficient way to do locking + // gc.registeredRateLimiter.registerIfNotPresent(fqKind.GroupVersion(), client, "garbage_collector_operation") resource, err := gc.apiResource(item.APIVersion, item.Kind, len(item.Namespace) != 0) if err != nil { return nil, err @@ -628,7 +631,8 @@ func (gc *GarbageCollector) getObject(item objectReference) (*runtime.Unstructur func (gc *GarbageCollector) updateObject(item objectReference, obj *runtime.Unstructured) (*runtime.Unstructured, error) { fqKind := unversioned.FromAPIVersionAndKind(item.APIVersion, item.Kind) client, err := gc.clientPool.ClientForGroupVersion(fqKind.GroupVersion()) - gc.registeredRateLimiter.registerIfNotPresent(fqKind.GroupVersion(), client, "garbage_collector_operation") + // TODO: remove the comment when we find an efficient way to do locking + // gc.registeredRateLimiter.registerIfNotPresent(fqKind.GroupVersion(), client, "garbage_collector_operation") resource, err := gc.apiResource(item.APIVersion, item.Kind, len(item.Namespace) != 0) if err != nil { return nil, err @@ -639,7 +643,8 @@ func (gc *GarbageCollector) updateObject(item objectReference, obj *runtime.Unst func (gc *GarbageCollector) patchObject(item objectReference, patch []byte) (*runtime.Unstructured, error) { fqKind := unversioned.FromAPIVersionAndKind(item.APIVersion, item.Kind) client, err := gc.clientPool.ClientForGroupVersion(fqKind.GroupVersion()) - gc.registeredRateLimiter.registerIfNotPresent(fqKind.GroupVersion(), client, "garbage_collector_operation") + // TODO: remove the comment when we find an efficient way to do locking + // gc.registeredRateLimiter.registerIfNotPresent(fqKind.GroupVersion(), client, "garbage_collector_operation") resource, err := gc.apiResource(item.APIVersion, item.Kind, len(item.Namespace) != 0) if err != nil { return nil, err