mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 07:03:31 +00:00
Merge pull request #1911 from erictune/token_client
Handle auth files with BearerToken sections.
This commit is contained in:
@@ -88,6 +88,7 @@ func loadClientOrDie() *client.Client {
|
||||
config.CAFile = auth.CAFile
|
||||
config.CertFile = auth.CertFile
|
||||
config.KeyFile = auth.KeyFile
|
||||
config.BearerToken = auth.BearerToken
|
||||
if auth.Insecure != nil {
|
||||
config.Insecure = *auth.Insecure
|
||||
}
|
||||
|
@@ -216,6 +216,9 @@ func main() {
|
||||
if auth.KeyFile != "" {
|
||||
clientConfig.KeyFile = auth.KeyFile
|
||||
}
|
||||
if auth.BearerToken != "" {
|
||||
clientConfig.BearerToken = auth.BearerToken
|
||||
}
|
||||
if auth.Insecure != nil {
|
||||
clientConfig.Insecure = *auth.Insecure
|
||||
}
|
||||
|
Reference in New Issue
Block a user