Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

fixed false api resource error log in kubefedctl #1410

Merged
merged 1 commit into from
May 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkg/kubefedctl/enable/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ func LookupAPIResource(config *rest.Config, key, targetVersion string) (*metav1.
}

if targetResource != nil {
klog.Warningf("Api resource found with err %v, and error could ignore.", apierrors.NewAggregate(errs))
if len(errs) != 0 {
klog.Warningf("Api resource found with err %v, and error could ignore.", apierrors.NewAggregate(errs))
}
klog.Info("Api resource found.")
return targetResource, nil
}

Expand Down