mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 13:25:26 +02:00
fix(kubeClient): get standard client [EE-6376] (#10692)
Co-authored-by: testa113 <testa113>
This commit is contained in:
parent
dc574af734
commit
2fe965942a
1 changed files with 3 additions and 9 deletions
|
@ -2,7 +2,6 @@ package kubernetes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
|
||||||
|
|
||||||
portainer "github.com/portainer/portainer/api"
|
portainer "github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/api/http/middlewares"
|
"github.com/portainer/portainer/api/http/middlewares"
|
||||||
|
@ -178,14 +177,9 @@ func (handler *Handler) getKubernetesIngressControllersByNamespace(w http.Respon
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
cli, ok := handler.KubernetesClientFactory.GetProxyKubeClient(
|
cli, handlerErr := handler.getProxyKubeClient(r)
|
||||||
strconv.Itoa(endpointID), r.Header.Get("Authorization"),
|
if handlerErr != nil {
|
||||||
)
|
return handlerErr
|
||||||
if !ok {
|
|
||||||
return httperror.InternalServerError(
|
|
||||||
"Failed to lookup KubeClient",
|
|
||||||
nil,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
currentControllers, err := cli.GetIngressControllers()
|
currentControllers, err := cli.GetIngressControllers()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue