mirror of https://github.com/k3s-io/k3s
Merge pull request #10148 from mikedanese/log-service-account
log a message when we fall back to service accountpull/6/head
commit
7002ce2336
|
@ -20,6 +20,8 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
|
"github.com/golang/glog"
|
||||||
|
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||||
clientcmdapi "github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd/api"
|
clientcmdapi "github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd/api"
|
||||||
)
|
)
|
||||||
|
@ -84,6 +86,7 @@ func (config DeferredLoadingClientConfig) ClientConfig() (*client.Config, error)
|
||||||
icc := inClusterClientConfig{}
|
icc := inClusterClientConfig{}
|
||||||
defaultConfig, err := DefaultClientConfig.ClientConfig()
|
defaultConfig, err := DefaultClientConfig.ClientConfig()
|
||||||
if icc.Possible() && err == nil && reflect.DeepEqual(mergedConfig, defaultConfig) {
|
if icc.Possible() && err == nil && reflect.DeepEqual(mergedConfig, defaultConfig) {
|
||||||
|
glog.V(2).Info("no kubeconfig could be created, falling back to service account.")
|
||||||
return icc.ClientConfig()
|
return icc.ClientConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue