cluster clusters

This commit is contained in:
LiHui
2022-05-20 11:53:51 +08:00
parent 49cc977cf0
commit 32b85cd625
18 changed files with 81 additions and 65 deletions

View File

@@ -17,6 +17,7 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
"kubesphere.io/kubesphere/pkg/utils/clusterclient"
"math"
"net/url"
"strconv"
@@ -50,7 +51,7 @@ type openpitrixHandler struct {
openpitrix openpitrix.Interface
}
func newOpenpitrixHandler(ksInformers informers.InformerFactory, ksClient versioned.Interface, option *openpitrixoptions.Options, stopCh <-chan struct{}) *openpitrixHandler {
func newOpenpitrixHandler(ksInformers informers.InformerFactory, ksClient versioned.Interface, option *openpitrixoptions.Options, cc clusterclient.ClusterClients, stopCh <-chan struct{}) *openpitrixHandler {
var s3Client s3.Interface
if option != nil && option.S3Options != nil && len(option.S3Options.Endpoint) != 0 {
var err error
@@ -61,7 +62,7 @@ func newOpenpitrixHandler(ksInformers informers.InformerFactory, ksClient versio
}
return &openpitrixHandler{
openpitrix.NewOpenpitrixOperator(ksInformers, ksClient, s3Client, stopCh),
openpitrix.NewOpenpitrixOperator(ksInformers, ksClient, s3Client, cc, stopCh),
}
}