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"
|
||||
"reflect"
|
||||
|
||||
"github.com/golang/glog"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||
clientcmdapi "github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd/api"
|
||||
)
|
||||
|
@ -84,6 +86,7 @@ func (config DeferredLoadingClientConfig) ClientConfig() (*client.Config, error)
|
|||
icc := inClusterClientConfig{}
|
||||
defaultConfig, err := DefaultClientConfig.ClientConfig()
|
||||
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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue