Add update cluster kubeconfig API

This commit is contained in:
Xinzhao Xu
2021-12-21 17:33:21 +08:00
parent e1df8bc5bb
commit 883097a3ad
6 changed files with 93 additions and 9 deletions

View File

@@ -22,6 +22,7 @@ import (
"fmt"
"net/http"
rt "runtime"
"strconv"
"time"
"kubesphere.io/kubesphere/pkg/utils/iputil"
@@ -34,8 +35,6 @@ import (
openpitrixv2alpha1 "kubesphere.io/kubesphere/pkg/kapis/openpitrix/v2alpha1"
"strconv"
"github.com/emicklei/go-restful"
"k8s.io/apimachinery/pkg/runtime/schema"
urlruntime "k8s.io/apimachinery/pkg/util/runtime"
@@ -228,6 +227,7 @@ func (s *APIServer) installKubeSphereAPIs() {
s.KubernetesClient.KubeSphere(), s.EventsClient, s.LoggingClient, s.AuditingClient, amOperator, rbacAuthorizer, s.MonitoringClient, s.RuntimeCache, s.Config.MeteringOptions))
urlruntime.Must(terminalv1alpha2.AddToContainer(s.container, s.KubernetesClient.Kubernetes(), rbacAuthorizer, s.KubernetesClient.Config()))
urlruntime.Must(clusterkapisv1alpha1.AddToContainer(s.container,
s.KubernetesClient.KubeSphere(),
s.InformerFactory.KubernetesSharedInformerFactory(),
s.InformerFactory.KubeSphereSharedInformerFactory(),
s.Config.MultiClusterOptions.ProxyPublishService,