Skip to content

Commit 03a5089

Browse files
committed
s/kcp/gcp
1 parent 5a08aae commit 03a5089

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

server/cmd/options/authentication.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ func (s *AdminAuthentication) AddFlags(fs *pflag.FlagSet) {
8080
"Path to which the administrative token hash should be written at startup. If this is relative, it is relative to --root-directory.")
8181
}
8282

83-
// ApplyTo returns a new volatile kcp admin token.
83+
// ApplyTo returns a new volatile gcp admin token.
8484
// It also returns a new shard admin token and its hash if the configured shard admin hash file is not present.
8585
// If the shard admin hash file is present only the shard admin hash is returned and the returned shard admin token is empty.
8686
func (s *AdminAuthentication) ApplyTo(config *genericapiserver.Config) (volatileGcpAdminToken, volatileUserToken string, err error) {
8787
volatileUserToken = uuid.New().String()
8888
volatileGcpAdminToken = uuid.New().String()
8989

90-
kcpAdminUser := &user.DefaultInfo{
90+
gcpAdminUser := &user.DefaultInfo{
9191
Name: gcpAdminUserName,
9292
UID: uuid.New().String(),
9393
Groups: []string{
@@ -103,7 +103,7 @@ func (s *AdminAuthentication) ApplyTo(config *genericapiserver.Config) (volatile
103103

104104
newAuthenticator := group.NewAuthenticatedGroupAdder(bearertoken.New(authenticator.WrapAudienceAgnosticToken(config.Authentication.APIAudiences, authenticator.TokenFunc(func(ctx context.Context, requestToken string) (*authenticator.Response, bool, error) {
105105
if requestToken == volatileGcpAdminToken {
106-
return &authenticator.Response{User: kcpAdminUser}, true, nil
106+
return &authenticator.Response{User: gcpAdminUser}, true, nil
107107
}
108108

109109
if requestToken == volatileUserToken {
@@ -118,11 +118,11 @@ func (s *AdminAuthentication) ApplyTo(config *genericapiserver.Config) (volatile
118118
return volatileGcpAdminToken, volatileUserToken, nil
119119
}
120120

121-
func (s *AdminAuthentication) WriteKubeConfig(config genericapiserver.CompletedConfig, kcpAdminToken, userToken string) error {
121+
func (s *AdminAuthentication) WriteKubeConfig(config genericapiserver.CompletedConfig, gcpAdminToken, userToken string) error {
122122
externalCACert, _ := config.SecureServing.Cert.CurrentCertKeyContent()
123123
externalKubeConfigHost := fmt.Sprintf("https://%s", config.ExternalAddress)
124124

125-
externalKubeConfig := createKubeConfig(kcpAdminToken, userToken, externalKubeConfigHost, "", externalCACert)
125+
externalKubeConfig := createKubeConfig(gcpAdminToken, userToken, externalKubeConfigHost, "", externalCACert)
126126
return clientcmd.WriteToFile(*externalKubeConfig, s.KubeConfigPath)
127127
}
128128

0 commit comments

Comments
 (0)