Refactoring ValidateUsages for for bootstrap tokens.

This commit is contained in:
xiangpengzhao
2017-11-23 20:05:28 +08:00
parent 980a5e80b1
commit 926baf5fe7
3 changed files with 8 additions and 5 deletions

View File

@@ -25,6 +25,7 @@ import (
"time"
"k8s.io/api/core/v1"
bootstrapapi "k8s.io/kubernetes/pkg/bootstrap/api"
"k8s.io/kubernetes/pkg/registry/core/service/ipallocator"
"k8s.io/kubernetes/pkg/util/version"
)
@@ -220,7 +221,7 @@ var (
AuthorizationWebhookConfigPath = filepath.Join(KubernetesDir, "webhook_authz.conf")
// DefaultTokenUsages specifies the default functions a token will get
DefaultTokenUsages = []string{"signing", "authentication"}
DefaultTokenUsages = bootstrapapi.KnownTokenUsages
// MasterComponents defines the master component names
MasterComponents = []string{KubeAPIServer, KubeControllerManager, KubeScheduler}