diff --git a/internal/dashboard/business/oceanbase/obcluster_usage.go b/internal/dashboard/business/oceanbase/obcluster_usage.go index f015f6b5..be772ca4 100644 --- a/internal/dashboard/business/oceanbase/obcluster_usage.go +++ b/internal/dashboard/business/oceanbase/obcluster_usage.go @@ -37,7 +37,9 @@ func GetOBClusterUsages(ctx context.Context, nn *param.K8sObjectIdentity) (*resp } clt := client.GetClient() serverList := &v1alpha1.OBServerList{} - err = clients.ServerClient.List(ctx, nn.Namespace, serverList, metav1.ListOptions{}) + err = clients.ServerClient.List(ctx, nn.Namespace, serverList, metav1.ListOptions{ + LabelSelector: oceanbaseconst.LabelRefOBCluster + "=" + obcluster.Name, + }) if err != nil { return nil, httpErr.NewInternal(err.Error()) }