Skip to content

Commit

Permalink
perf: add log
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail committed Jan 13, 2025
1 parent 07b1021 commit 7a0e226
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/controller/apigateway/api_gateway_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ func (g Struct) DeleteTCPRoute(w http.ResponseWriter, r *http.Request) {

k := k8s.Default().Clientset.CoreV1()
// List services with the specified labels
logrus.Infof("show tenant namespace %v and labelSelector %v", tenant.Namespace, labelSelector)
services, err := k.Services(tenant.Namespace).List(r.Context(), v1.ListOptions{
LabelSelector: labelSelector,
})
Expand All @@ -526,7 +527,7 @@ func (g Struct) DeleteTCPRoute(w http.ResponseWriter, r *http.Request) {
httputil.ReturnBcodeError(r, w, bcode.ErrRouteDelete)
return
}

logrus.Infof("show service len %v", len(services.Items))
if len(services.Items) == 0 {
// No services found with these labels
httputil.ReturnSuccess(r, w, name)
Expand Down

0 comments on commit 7a0e226

Please sign in to comment.