BoundServiceAccountTokenVolume: fix InClusterConfig
Kubernetes-commit: 6919c6e1ab3dcd3f02bcbf3c6f106089d867090b
This commit is contained in:
parent
5c7fdad0ef
commit
cfb8fffae9
|
@ -171,6 +171,7 @@ func restConfigFromKubeconfig(configAuthInfo *clientcmdapi.AuthInfo) (*rest.Conf
|
|||
// blindly overwrite existing values based on precedence
|
||||
if len(configAuthInfo.Token) > 0 {
|
||||
config.BearerToken = configAuthInfo.Token
|
||||
config.BearerTokenFile = configAuthInfo.TokenFile
|
||||
} else if len(configAuthInfo.TokenFile) > 0 {
|
||||
tokenBytes, err := ioutil.ReadFile(configAuthInfo.TokenFile)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue