From d6a6f115add6ed642d6a907dd4cba7c1dcfbfea2 Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Thu, 29 Dec 2022 15:45:50 +0800 Subject: [PATCH] fix(webconsole): not get pod info when fetchK8sEnv --- pkg/webconsole/handlers.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pkg/webconsole/handlers.go b/pkg/webconsole/handlers.go index e200e7fbfa..5663286283 100644 --- a/pkg/webconsole/handlers.go +++ b/pkg/webconsole/handlers.go @@ -82,17 +82,6 @@ func fetchK8sEnv(ctx context.Context, w http.ResponseWriter, r *http.Request) (* podName := params[""] adminSession := auth.GetAdminSession(ctx, o.Options.Region) - query := jsonutils.NewDict() - query.Add(jsonutils.NewString(k8sReq.Namespace), "namespace") - query.Add(jsonutils.NewString(k8sReq.Cluster), "cluster") - obj, err := k8s.Pods.Get(adminSession, podName, query) - if err != nil { - return nil, err - } - if obj == nil { - return nil, httperrors.NewNotFoundError("Not found pod %q", podName) - } - data := jsonutils.NewDict() ret, err := k8s.KubeClusters.GetSpecific(adminSession, k8sReq.Cluster, "kubeconfig", data) if err != nil {