From 2fe965942a012d5cf563daf5707be4172bf47927 Mon Sep 17 00:00:00 2001 From: Ali <83188384+testA113@users.noreply.github.com> Date: Mon, 27 Nov 2023 16:48:47 +1300 Subject: [PATCH] fix(kubeClient): get standard client [EE-6376] (#10692) Co-authored-by: testa113 --- api/http/handler/kubernetes/ingresses.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/api/http/handler/kubernetes/ingresses.go b/api/http/handler/kubernetes/ingresses.go index 2ddd5073a..6ac3fceaa 100644 --- a/api/http/handler/kubernetes/ingresses.go +++ b/api/http/handler/kubernetes/ingresses.go @@ -2,7 +2,6 @@ package kubernetes import ( "net/http" - "strconv" portainer "github.com/portainer/portainer/api" "github.com/portainer/portainer/api/http/middlewares" @@ -178,14 +177,9 @@ func (handler *Handler) getKubernetesIngressControllersByNamespace(w http.Respon ) } - cli, ok := handler.KubernetesClientFactory.GetProxyKubeClient( - strconv.Itoa(endpointID), r.Header.Get("Authorization"), - ) - if !ok { - return httperror.InternalServerError( - "Failed to lookup KubeClient", - nil, - ) + cli, handlerErr := handler.getProxyKubeClient(r) + if handlerErr != nil { + return handlerErr } currentControllers, err := cli.GetIngressControllers()