BearerTokenFile should be set to empty when overwrites BearerToken
What does this MR do?
According to https://github.com/kubernetes/client-go/blob/master/rest/config.go#L75 ,
Content of rest.Config.BearerToken
will be replaced by content of BearerTokenFile
:
// Path to a file containing a BearerToken.
// If set, the contents are periodically read.
// The last successfully read value takes precedence over BearerToken.
BearerTokenFile string
If runner use "in cluster config", BearerTokenFile
is set to /var/run/secrets/kubernetes.io/serviceaccount/token
, and BearerToken overwrite will not work correctly.
When overwrites BearerToken, BearerTokenFile
should set to ""
.