Skip to content

Commit

Permalink
list observer by obcluster name (#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-sun-star authored Jan 10, 2025
1 parent 198cd04 commit 3b20a2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/dashboard/business/oceanbase/obcluster_usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down

0 comments on commit 3b20a2d

Please sign in to comment.