fix(kubeClient): get standard client [EE-6376] (#10692)

Co-authored-by: testa113 <testa113>
pull/10694/head
Ali 1 year ago committed by GitHub
parent dc574af734
commit 2fe965942a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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()

Loading…
Cancel
Save