Merge pull request #3268 from RolandMa1986/feat-sa

Feat ServiceAccount management
This commit is contained in:
KubeSphere CI Bot
2021-01-21 20:03:40 +08:00
committed by GitHub
11 changed files with 527 additions and 5 deletions

View File

@@ -20,6 +20,12 @@ import (
"bytes"
"context"
"fmt"
"net/http"
rt "runtime"
"time"
"strconv"
"github.com/emicklei/go-restful"
"k8s.io/apimachinery/pkg/runtime/schema"
urlruntime "k8s.io/apimachinery/pkg/util/runtime"
@@ -86,11 +92,7 @@ import (
"kubesphere.io/kubesphere/pkg/simple/client/sonarqube"
"kubesphere.io/kubesphere/pkg/utils/metrics"
utilnet "kubesphere.io/kubesphere/pkg/utils/net"
"net/http"
rt "runtime"
runtimecache "sigs.k8s.io/controller-runtime/pkg/cache"
"strconv"
"time"
)
const (
@@ -383,6 +385,8 @@ func (s *APIServer) waitForResourceSync(stopCh <-chan struct{}) error {
{Group: "", Version: "v1", Resource: "persistentvolumeclaims"},
{Group: "", Version: "v1", Resource: "secrets"},
{Group: "", Version: "v1", Resource: "configmaps"},
{Group: "", Version: "v1", Resource: "serviceaccounts"},
{Group: "rbac.authorization.k8s.io", Version: "v1", Resource: "roles"},
{Group: "rbac.authorization.k8s.io", Version: "v1", Resource: "rolebindings"},
{Group: "rbac.authorization.k8s.io", Version: "v1", Resource: "clusterroles"},