mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Allow ServiceAccountsController to manage multiple named service accounts
This commit is contained in:
parent
fce749b048
commit
7e9281fc39
@ -263,7 +263,7 @@ func (s *CMServer) Run(_ []string) error {
|
|||||||
|
|
||||||
serviceaccount.NewServiceAccountsController(
|
serviceaccount.NewServiceAccountsController(
|
||||||
kubeClient,
|
kubeClient,
|
||||||
serviceaccount.DefaultServiceAccountControllerOptions(),
|
serviceaccount.DefaultServiceAccountsControllerOptions(),
|
||||||
).Run()
|
).Run()
|
||||||
|
|
||||||
select {}
|
select {}
|
||||||
|
@ -28,6 +28,7 @@ import (
|
|||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
||||||
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
)
|
)
|
||||||
@ -41,24 +42,38 @@ func nameIndexFunc(obj interface{}) (string, error) {
|
|||||||
return meta.Name(), nil
|
return meta.Name(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type ServiceAccountControllerOptions struct {
|
// ServiceAccountsControllerOptions contains options for running a ServiceAccountsController
|
||||||
Name string
|
type ServiceAccountsControllerOptions struct {
|
||||||
|
// Names is the set of service account names to ensure exist in every namespace
|
||||||
|
Names util.StringSet
|
||||||
|
|
||||||
|
// ServiceAccountResync is the interval between full resyncs of ServiceAccounts.
|
||||||
|
// If non-zero, all service accounts will be re-listed this often.
|
||||||
|
// Otherwise, re-list will be delayed as long as possible (until the watch is closed or times out).
|
||||||
ServiceAccountResync time.Duration
|
ServiceAccountResync time.Duration
|
||||||
|
|
||||||
|
// NamespaceResync is the interval between full resyncs of Namespaces.
|
||||||
|
// If non-zero, all namespaces will be re-listed this often.
|
||||||
|
// Otherwise, re-list will be delayed as long as possible (until the watch is closed or times out).
|
||||||
NamespaceResync time.Duration
|
NamespaceResync time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
func DefaultServiceAccountControllerOptions() ServiceAccountControllerOptions {
|
func DefaultServiceAccountsControllerOptions() ServiceAccountsControllerOptions {
|
||||||
return ServiceAccountControllerOptions{Name: "default"}
|
return ServiceAccountsControllerOptions{Names: util.NewStringSet("default")}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewServiceAccountsController returns a new *ServiceAccountsController.
|
// NewServiceAccountsController returns a new *ServiceAccountsController.
|
||||||
func NewServiceAccountsController(cl *client.Client, options ServiceAccountControllerOptions) *ServiceAccountsController {
|
func NewServiceAccountsController(cl client.Interface, options ServiceAccountsControllerOptions) *ServiceAccountsController {
|
||||||
e := &ServiceAccountsController{
|
e := &ServiceAccountsController{
|
||||||
client: cl,
|
client: cl,
|
||||||
name: options.Name,
|
names: options.Names,
|
||||||
}
|
}
|
||||||
|
|
||||||
accountSelector := fields.SelectorFromSet(map[string]string{client.ObjectNameField: options.Name})
|
accountSelector := fields.Everything()
|
||||||
|
if len(options.Names) == 1 {
|
||||||
|
// If we're maintaining a single account, we can scope the accounts we watch to just that name
|
||||||
|
accountSelector = fields.SelectorFromSet(map[string]string{client.ObjectNameField: options.Names.List()[0]})
|
||||||
|
}
|
||||||
e.serviceAccounts, e.serviceAccountController = framework.NewIndexerInformer(
|
e.serviceAccounts, e.serviceAccountController = framework.NewIndexerInformer(
|
||||||
&cache.ListWatch{
|
&cache.ListWatch{
|
||||||
ListFunc: func() (runtime.Object, error) {
|
ListFunc: func() (runtime.Object, error) {
|
||||||
@ -101,8 +116,8 @@ func NewServiceAccountsController(cl *client.Client, options ServiceAccountContr
|
|||||||
type ServiceAccountsController struct {
|
type ServiceAccountsController struct {
|
||||||
stopChan chan struct{}
|
stopChan chan struct{}
|
||||||
|
|
||||||
client *client.Client
|
client client.Interface
|
||||||
name string
|
names util.StringSet
|
||||||
|
|
||||||
serviceAccounts cache.Indexer
|
serviceAccounts cache.Indexer
|
||||||
namespaces cache.Indexer
|
namespaces cache.Indexer
|
||||||
@ -137,27 +152,34 @@ func (e *ServiceAccountsController) serviceAccountDeleted(obj interface{}) {
|
|||||||
// corresponding secrets will be cleaned up during the Secret re-list
|
// corresponding secrets will be cleaned up during the Secret re-list
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
e.createDefaultServiceAccountIfNeeded(serviceAccount.Namespace)
|
// If the deleted service account is one we're maintaining, recreate it
|
||||||
|
if e.names.Has(serviceAccount.Name) {
|
||||||
|
e.createServiceAccountIfNeeded(serviceAccount.Name, serviceAccount.Namespace)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// namespaceAdded reacts to a Namespace creation by creating a default ServiceAccount object
|
// namespaceAdded reacts to a Namespace creation by creating a default ServiceAccount object
|
||||||
func (e *ServiceAccountsController) namespaceAdded(obj interface{}) {
|
func (e *ServiceAccountsController) namespaceAdded(obj interface{}) {
|
||||||
namespace := obj.(*api.Namespace)
|
namespace := obj.(*api.Namespace)
|
||||||
e.createDefaultServiceAccountIfNeeded(namespace.Name)
|
for _, name := range e.names.List() {
|
||||||
|
e.createServiceAccountIfNeeded(name, namespace.Name)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// namespaceUpdated reacts to a Namespace update (or re-list) by creating a default ServiceAccount in the namespace if needed
|
// namespaceUpdated reacts to a Namespace update (or re-list) by creating a default ServiceAccount in the namespace if needed
|
||||||
func (e *ServiceAccountsController) namespaceUpdated(oldObj interface{}, newObj interface{}) {
|
func (e *ServiceAccountsController) namespaceUpdated(oldObj interface{}, newObj interface{}) {
|
||||||
newNamespace := newObj.(*api.Namespace)
|
newNamespace := newObj.(*api.Namespace)
|
||||||
e.createDefaultServiceAccountIfNeeded(newNamespace.Name)
|
for _, name := range e.names.List() {
|
||||||
|
e.createServiceAccountIfNeeded(name, newNamespace.Name)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// createDefaultServiceAccountIfNeeded creates a default ServiceAccount in the given namespace if:
|
// createServiceAccountIfNeeded creates a ServiceAccount with the given name in the given namespace if:
|
||||||
// * it default ServiceAccount does not already exist
|
// * the named ServiceAccount does not already exist
|
||||||
// * the specified namespace exists
|
// * the specified namespace exists
|
||||||
// * the specified namespace is in the ACTIVE phase
|
// * the specified namespace is in the ACTIVE phase
|
||||||
func (e *ServiceAccountsController) createDefaultServiceAccountIfNeeded(namespace string) {
|
func (e *ServiceAccountsController) createServiceAccountIfNeeded(name, namespace string) {
|
||||||
serviceAccount, err := e.getDefaultServiceAccount(namespace)
|
serviceAccount, err := e.getServiceAccount(name, namespace)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Error(err)
|
glog.Error(err)
|
||||||
return
|
return
|
||||||
@ -181,22 +203,21 @@ func (e *ServiceAccountsController) createDefaultServiceAccountIfNeeded(namespac
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
e.createDefaultServiceAccount(namespace)
|
e.createServiceAccount(name, namespace)
|
||||||
}
|
}
|
||||||
|
|
||||||
// createDefaultServiceAccount creates a default ServiceAccount in the specified namespace
|
// createDefaultServiceAccount creates a default ServiceAccount in the specified namespace
|
||||||
func (e *ServiceAccountsController) createDefaultServiceAccount(namespace string) {
|
func (e *ServiceAccountsController) createServiceAccount(name, namespace string) {
|
||||||
serviceAccount := &api.ServiceAccount{}
|
serviceAccount := &api.ServiceAccount{}
|
||||||
serviceAccount.Name = e.name
|
serviceAccount.Name = name
|
||||||
serviceAccount.Namespace = namespace
|
serviceAccount.Namespace = namespace
|
||||||
if _, err := e.client.ServiceAccounts(namespace).Create(serviceAccount); err != nil {
|
if _, err := e.client.ServiceAccounts(namespace).Create(serviceAccount); err != nil {
|
||||||
glog.Error(err)
|
glog.Error(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// getDefaultServiceAccount returns the default ServiceAccount for the given namespace
|
// getDefaultServiceAccount returns the ServiceAccount with the given name for the given namespace
|
||||||
func (e *ServiceAccountsController) getDefaultServiceAccount(namespace string) (*api.ServiceAccount, error) {
|
func (e *ServiceAccountsController) getServiceAccount(name, namespace string) (*api.ServiceAccount, error) {
|
||||||
|
|
||||||
key := &api.ServiceAccount{ObjectMeta: api.ObjectMeta{Namespace: namespace}}
|
key := &api.ServiceAccount{ObjectMeta: api.ObjectMeta{Namespace: namespace}}
|
||||||
accounts, err := e.serviceAccounts.Index("namespace", key)
|
accounts, err := e.serviceAccounts.Index("namespace", key)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -205,7 +226,7 @@ func (e *ServiceAccountsController) getDefaultServiceAccount(namespace string) (
|
|||||||
|
|
||||||
for _, obj := range accounts {
|
for _, obj := range accounts {
|
||||||
serviceAccount := obj.(*api.ServiceAccount)
|
serviceAccount := obj.(*api.ServiceAccount)
|
||||||
if e.name == serviceAccount.Name {
|
if name == serviceAccount.Name {
|
||||||
return serviceAccount, nil
|
return serviceAccount, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ import (
|
|||||||
|
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/testapi"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/testapi"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/testclient"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||||
)
|
)
|
||||||
@ -51,6 +51,9 @@ func makeTestServer(t *testing.T, namespace string, serviceAccountResponse serve
|
|||||||
func TestServiceAccountCreation(t *testing.T) {
|
func TestServiceAccountCreation(t *testing.T) {
|
||||||
ns := api.NamespaceDefault
|
ns := api.NamespaceDefault
|
||||||
|
|
||||||
|
defaultName := "default"
|
||||||
|
managedName := "managed"
|
||||||
|
|
||||||
activeNS := &api.Namespace{
|
activeNS := &api.Namespace{
|
||||||
ObjectMeta: api.ObjectMeta{Name: ns},
|
ObjectMeta: api.ObjectMeta{Name: ns},
|
||||||
Status: api.NamespaceStatus{
|
Status: api.NamespaceStatus{
|
||||||
@ -63,9 +66,23 @@ func TestServiceAccountCreation(t *testing.T) {
|
|||||||
Phase: api.NamespaceTerminating,
|
Phase: api.NamespaceTerminating,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
serviceAccount := &api.ServiceAccount{
|
defaultServiceAccount := &api.ServiceAccount{
|
||||||
ObjectMeta: api.ObjectMeta{
|
ObjectMeta: api.ObjectMeta{
|
||||||
Name: "default",
|
Name: defaultName,
|
||||||
|
Namespace: ns,
|
||||||
|
ResourceVersion: "1",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
managedServiceAccount := &api.ServiceAccount{
|
||||||
|
ObjectMeta: api.ObjectMeta{
|
||||||
|
Name: managedName,
|
||||||
|
Namespace: ns,
|
||||||
|
ResourceVersion: "1",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
unmanagedServiceAccount := &api.ServiceAccount{
|
||||||
|
ObjectMeta: api.ObjectMeta{
|
||||||
|
Name: "other-unmanaged",
|
||||||
Namespace: ns,
|
Namespace: ns,
|
||||||
ResourceVersion: "1",
|
ResourceVersion: "1",
|
||||||
},
|
},
|
||||||
@ -73,69 +90,94 @@ func TestServiceAccountCreation(t *testing.T) {
|
|||||||
|
|
||||||
testcases := map[string]struct {
|
testcases := map[string]struct {
|
||||||
ExistingNamespace *api.Namespace
|
ExistingNamespace *api.Namespace
|
||||||
ExistingServiceAccount *api.ServiceAccount
|
ExistingServiceAccounts []*api.ServiceAccount
|
||||||
|
|
||||||
AddedNamespace *api.Namespace
|
AddedNamespace *api.Namespace
|
||||||
UpdatedNamespace *api.Namespace
|
UpdatedNamespace *api.Namespace
|
||||||
DeletedServiceAccount *api.ServiceAccount
|
DeletedServiceAccount *api.ServiceAccount
|
||||||
|
|
||||||
ExpectCreatedServiceAccount bool
|
ExpectCreatedServiceAccounts []string
|
||||||
}{
|
}{
|
||||||
|
"new active namespace missing serviceaccounts": {
|
||||||
|
ExistingServiceAccounts: []*api.ServiceAccount{},
|
||||||
|
AddedNamespace: activeNS,
|
||||||
|
ExpectCreatedServiceAccounts: util.NewStringSet(defaultName, managedName).List(),
|
||||||
|
},
|
||||||
"new active namespace missing serviceaccount": {
|
"new active namespace missing serviceaccount": {
|
||||||
|
ExistingServiceAccounts: []*api.ServiceAccount{managedServiceAccount},
|
||||||
AddedNamespace: activeNS,
|
AddedNamespace: activeNS,
|
||||||
ExpectCreatedServiceAccount: true,
|
ExpectCreatedServiceAccounts: []string{defaultName},
|
||||||
},
|
},
|
||||||
"new active namespace with serviceaccount": {
|
"new active namespace with serviceaccounts": {
|
||||||
ExistingServiceAccount: serviceAccount,
|
ExistingServiceAccounts: []*api.ServiceAccount{defaultServiceAccount, managedServiceAccount},
|
||||||
AddedNamespace: activeNS,
|
AddedNamespace: activeNS,
|
||||||
ExpectCreatedServiceAccount: false,
|
ExpectCreatedServiceAccounts: []string{},
|
||||||
},
|
|
||||||
"new terminating namespace": {
|
|
||||||
AddedNamespace: terminatingNS,
|
|
||||||
ExpectCreatedServiceAccount: false,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"updated active namespace missing serviceaccount": {
|
"new terminating namespace": {
|
||||||
UpdatedNamespace: activeNS,
|
ExistingServiceAccounts: []*api.ServiceAccount{},
|
||||||
ExpectCreatedServiceAccount: true,
|
AddedNamespace: terminatingNS,
|
||||||
|
ExpectCreatedServiceAccounts: []string{},
|
||||||
},
|
},
|
||||||
"updated active namespace with serviceaccount": {
|
|
||||||
ExistingServiceAccount: serviceAccount,
|
"updated active namespace missing serviceaccounts": {
|
||||||
|
ExistingServiceAccounts: []*api.ServiceAccount{},
|
||||||
UpdatedNamespace: activeNS,
|
UpdatedNamespace: activeNS,
|
||||||
ExpectCreatedServiceAccount: false,
|
ExpectCreatedServiceAccounts: util.NewStringSet(defaultName, managedName).List(),
|
||||||
|
},
|
||||||
|
"updated active namespace missing serviceaccount": {
|
||||||
|
ExistingServiceAccounts: []*api.ServiceAccount{defaultServiceAccount},
|
||||||
|
UpdatedNamespace: activeNS,
|
||||||
|
ExpectCreatedServiceAccounts: []string{managedName},
|
||||||
|
},
|
||||||
|
"updated active namespace with serviceaccounts": {
|
||||||
|
ExistingServiceAccounts: []*api.ServiceAccount{defaultServiceAccount, managedServiceAccount},
|
||||||
|
UpdatedNamespace: activeNS,
|
||||||
|
ExpectCreatedServiceAccounts: []string{},
|
||||||
},
|
},
|
||||||
"updated terminating namespace": {
|
"updated terminating namespace": {
|
||||||
|
ExistingServiceAccounts: []*api.ServiceAccount{},
|
||||||
UpdatedNamespace: terminatingNS,
|
UpdatedNamespace: terminatingNS,
|
||||||
ExpectCreatedServiceAccount: false,
|
ExpectCreatedServiceAccounts: []string{},
|
||||||
},
|
},
|
||||||
|
|
||||||
"deleted serviceaccount without namespace": {
|
"deleted serviceaccount without namespace": {
|
||||||
DeletedServiceAccount: serviceAccount,
|
DeletedServiceAccount: defaultServiceAccount,
|
||||||
ExpectCreatedServiceAccount: false,
|
ExpectCreatedServiceAccounts: []string{},
|
||||||
},
|
},
|
||||||
"deleted serviceaccount with active namespace": {
|
"deleted serviceaccount with active namespace": {
|
||||||
ExistingNamespace: activeNS,
|
ExistingNamespace: activeNS,
|
||||||
DeletedServiceAccount: serviceAccount,
|
DeletedServiceAccount: defaultServiceAccount,
|
||||||
ExpectCreatedServiceAccount: true,
|
ExpectCreatedServiceAccounts: []string{defaultName},
|
||||||
},
|
},
|
||||||
"deleted serviceaccount with terminating namespace": {
|
"deleted serviceaccount with terminating namespace": {
|
||||||
ExistingNamespace: terminatingNS,
|
ExistingNamespace: terminatingNS,
|
||||||
DeletedServiceAccount: serviceAccount,
|
DeletedServiceAccount: defaultServiceAccount,
|
||||||
ExpectCreatedServiceAccount: false,
|
ExpectCreatedServiceAccounts: []string{},
|
||||||
|
},
|
||||||
|
"deleted unmanaged serviceaccount with active namespace": {
|
||||||
|
ExistingNamespace: activeNS,
|
||||||
|
DeletedServiceAccount: unmanagedServiceAccount,
|
||||||
|
ExpectCreatedServiceAccounts: []string{},
|
||||||
|
},
|
||||||
|
"deleted unmanaged serviceaccount with terminating namespace": {
|
||||||
|
ExistingNamespace: terminatingNS,
|
||||||
|
DeletedServiceAccount: unmanagedServiceAccount,
|
||||||
|
ExpectCreatedServiceAccounts: []string{},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for k, tc := range testcases {
|
for k, tc := range testcases {
|
||||||
|
client := testclient.NewSimpleFake(defaultServiceAccount, managedServiceAccount)
|
||||||
testServer, handler := makeTestServer(t, ns, serverResponse{http.StatusOK, serviceAccount})
|
options := DefaultServiceAccountsControllerOptions()
|
||||||
client := client.NewOrDie(&client.Config{Host: testServer.URL, Version: testapi.Version()})
|
options.Names = util.NewStringSet(defaultName, managedName)
|
||||||
controller := NewServiceAccountsController(client, DefaultServiceAccountControllerOptions())
|
controller := NewServiceAccountsController(client, options)
|
||||||
|
|
||||||
if tc.ExistingNamespace != nil {
|
if tc.ExistingNamespace != nil {
|
||||||
controller.namespaces.Add(tc.ExistingNamespace)
|
controller.namespaces.Add(tc.ExistingNamespace)
|
||||||
}
|
}
|
||||||
if tc.ExistingServiceAccount != nil {
|
for _, s := range tc.ExistingServiceAccounts {
|
||||||
controller.serviceAccounts.Add(tc.ExistingServiceAccount)
|
controller.serviceAccounts.Add(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
if tc.AddedNamespace != nil {
|
if tc.AddedNamespace != nil {
|
||||||
@ -150,16 +192,20 @@ func TestServiceAccountCreation(t *testing.T) {
|
|||||||
controller.serviceAccountDeleted(tc.DeletedServiceAccount)
|
controller.serviceAccountDeleted(tc.DeletedServiceAccount)
|
||||||
}
|
}
|
||||||
|
|
||||||
if tc.ExpectCreatedServiceAccount {
|
if len(tc.ExpectCreatedServiceAccounts) != len(client.Actions) {
|
||||||
if !handler.ValidateRequestCount(t, 1) {
|
t.Errorf("%s: Expected to create accounts %#v. Actual actions were: %#v", k, tc.ExpectCreatedServiceAccounts, client.Actions)
|
||||||
t.Errorf("%s: Expected a single creation call", k)
|
continue
|
||||||
}
|
}
|
||||||
} else {
|
for i, expectedName := range tc.ExpectCreatedServiceAccounts {
|
||||||
if !handler.ValidateRequestCount(t, 0) {
|
action := client.Actions[i]
|
||||||
t.Errorf("%s: Expected no creation calls", k)
|
if action.Action != "create-serviceaccount" {
|
||||||
|
t.Errorf("%s: Unexpected action %s", k, action.Action)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
createdAccount := action.Value.(*api.ServiceAccount)
|
||||||
|
if createdAccount.Name != expectedName {
|
||||||
|
t.Errorf("%s: Expected %s to be created, got %s", k, expectedName, createdAccount.Name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testServer.Close()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -423,7 +423,7 @@ func startServiceAccountTestServer(t *testing.T) (*client.Client, client.Config,
|
|||||||
// Start the service account and service account token controllers
|
// Start the service account and service account token controllers
|
||||||
tokenController := serviceaccount.NewTokensController(rootClient, serviceaccount.DefaultTokenControllerOptions(serviceaccount.JWTTokenGenerator(serviceAccountKey)))
|
tokenController := serviceaccount.NewTokensController(rootClient, serviceaccount.DefaultTokenControllerOptions(serviceaccount.JWTTokenGenerator(serviceAccountKey)))
|
||||||
tokenController.Run()
|
tokenController.Run()
|
||||||
serviceAccountController := serviceaccount.NewServiceAccountsController(rootClient, serviceaccount.DefaultServiceAccountControllerOptions())
|
serviceAccountController := serviceaccount.NewServiceAccountsController(rootClient, serviceaccount.DefaultServiceAccountsControllerOptions())
|
||||||
serviceAccountController.Run()
|
serviceAccountController.Run()
|
||||||
// Start the admission plugin reflectors
|
// Start the admission plugin reflectors
|
||||||
serviceAccountAdmission.Run()
|
serviceAccountAdmission.Run()
|
||||||
|
Loading…
Reference in New Issue
Block a user