diff --git a/pkg/monitor/util/cache/cache.go b/pkg/monitor/util/cache/cache.go index 3cff588e4..c525a275d 100644 --- a/pkg/monitor/util/cache/cache.go +++ b/pkg/monitor/util/cache/cache.go @@ -348,6 +348,9 @@ func NewCacher(platformClient platformversionedclient.PlatformV1Interface, func (c *cacher) getTApps(ctx context.Context, curDynamicClientSet util.DynamicClientSet, cluster string) int { count := 0 + if curDynamicClientSet == nil { + log.Warn("Query TApps failed", log.Any("cluster", cluster), log.Err(fmt.Errorf("DynamicClientSet is nil"))) + } content, err := curDynamicClientSet[cluster].Resource(TAppResource). Namespace(AllNamespaces).List(ctx, metav1.ListOptions{}) if content == nil || (err != nil && !errors.IsNotFound(err)) {