add s2i support

This commit is contained in:
runzexia
2019-03-22 13:08:59 +08:00
committed by zryfish
parent 9566549f08
commit 12c4cd9f30
49 changed files with 4016 additions and 2440 deletions

View File

@@ -0,0 +1,31 @@
package k8s
import (
"log"
"sync"
s2i "github.com/kubesphere/s2ioperator/pkg/client/clientset/versioned"
)
var (
s2iClient *s2i.Clientset
s2iClientOnce sync.Once
)
func S2iClient() *s2i.Clientset {
s2iClientOnce.Do(func() {
config, err := Config()
if err != nil {
log.Fatalln(err)
}
s2iClient = s2i.NewForConfigOrDie(config)
KubeConfig = config
})
return s2iClient
}