delete user in devops

This commit is contained in:
runzexia
2019-05-06 15:48:04 +08:00
committed by zryfish
parent 7748ad8f3c
commit 21c2e4920f
4 changed files with 54 additions and 1 deletions

View File

@@ -29,6 +29,8 @@ import (
"kubesphere.io/kubesphere/pkg/informers"
"kubesphere.io/kubesphere/pkg/models/iam"
"kubesphere.io/kubesphere/pkg/signals"
"kubesphere.io/kubesphere/pkg/simple/client/admin_jenkins"
"kubesphere.io/kubesphere/pkg/simple/client/devops_mysql"
"kubesphere.io/kubesphere/pkg/utils/jwtutil"
"log"
"net/http"
@@ -69,6 +71,9 @@ func Run(s *options.ServerRunOptions) error {
waitForResourceSync()
initializeAdminJenkins()
initializeDevOpsDatabase()
err = iam.Init(s.AdminEmail, s.AdminPassword, expireTime)
jwtutil.Setup(s.JWTSecret)
@@ -119,3 +124,11 @@ func waitForResourceSync() {
ksInformerFactory.WaitForCacheSync(stopChan)
log.Println("resources sync success")
}
func initializeAdminJenkins() {
admin_jenkins.Client()
}
func initializeDevOpsDatabase() {
devops_mysql.OpenDatabase()
}