Fix: useless log when enabling addon (#4680)

* Fix: useless log when enabling addon

Signed-off-by: loheagn <loheagn@icloud.com>

* lint code

Signed-off-by: loheagn <loheagn@icloud.com>

Signed-off-by: loheagn <loheagn@icloud.com>
This commit is contained in:
Nan Li
2022-09-05 13:27:28 +08:00
committed by GitHub
parent b9cb8fa591
commit 3b3e7ebb9d
+1 -1
View File
@@ -820,7 +820,7 @@ func iterateListSubResources(ctx context.Context, cluster string, k8sClient clie
items, err := listItemByRule(clusterCTX, k8sClient, resource, *parentObject, specifiedFunc, rule.DefaultGenListOptionFunc, rule.DisableFilterByOwnerReference)
if err != nil {
if meta.IsNoMatchError(err) || runtime.IsNotRegisteredError(err) {
klog.Errorf("error to list sub-resources: %s err: %v", resource.Kind, err)
klog.Warningf("not listing sub-resources: %s err: %v", resource.Kind, err)
continue
}
return nil, err