@@ -80,14 +80,14 @@ func (s *AdminAuthentication) AddFlags(fs *pflag.FlagSet) {
80
80
"Path to which the administrative token hash should be written at startup. If this is relative, it is relative to --root-directory." )
81
81
}
82
82
83
- // ApplyTo returns a new volatile kcp admin token.
83
+ // ApplyTo returns a new volatile gcp admin token.
84
84
// It also returns a new shard admin token and its hash if the configured shard admin hash file is not present.
85
85
// If the shard admin hash file is present only the shard admin hash is returned and the returned shard admin token is empty.
86
86
func (s * AdminAuthentication ) ApplyTo (config * genericapiserver.Config ) (volatileGcpAdminToken , volatileUserToken string , err error ) {
87
87
volatileUserToken = uuid .New ().String ()
88
88
volatileGcpAdminToken = uuid .New ().String ()
89
89
90
- kcpAdminUser := & user.DefaultInfo {
90
+ gcpAdminUser := & user.DefaultInfo {
91
91
Name : gcpAdminUserName ,
92
92
UID : uuid .New ().String (),
93
93
Groups : []string {
@@ -103,7 +103,7 @@ func (s *AdminAuthentication) ApplyTo(config *genericapiserver.Config) (volatile
103
103
104
104
newAuthenticator := group .NewAuthenticatedGroupAdder (bearertoken .New (authenticator .WrapAudienceAgnosticToken (config .Authentication .APIAudiences , authenticator .TokenFunc (func (ctx context.Context , requestToken string ) (* authenticator.Response , bool , error ) {
105
105
if requestToken == volatileGcpAdminToken {
106
- return & authenticator.Response {User : kcpAdminUser }, true , nil
106
+ return & authenticator.Response {User : gcpAdminUser }, true , nil
107
107
}
108
108
109
109
if requestToken == volatileUserToken {
@@ -118,11 +118,11 @@ func (s *AdminAuthentication) ApplyTo(config *genericapiserver.Config) (volatile
118
118
return volatileGcpAdminToken , volatileUserToken , nil
119
119
}
120
120
121
- func (s * AdminAuthentication ) WriteKubeConfig (config genericapiserver.CompletedConfig , kcpAdminToken , userToken string ) error {
121
+ func (s * AdminAuthentication ) WriteKubeConfig (config genericapiserver.CompletedConfig , gcpAdminToken , userToken string ) error {
122
122
externalCACert , _ := config .SecureServing .Cert .CurrentCertKeyContent ()
123
123
externalKubeConfigHost := fmt .Sprintf ("https://%s" , config .ExternalAddress )
124
124
125
- externalKubeConfig := createKubeConfig (kcpAdminToken , userToken , externalKubeConfigHost , "" , externalCACert )
125
+ externalKubeConfig := createKubeConfig (gcpAdminToken , userToken , externalKubeConfigHost , "" , externalCACert )
126
126
return clientcmd .WriteToFile (* externalKubeConfig , s .KubeConfigPath )
127
127
}
128
128
0 commit comments