Merge pull request #10148 from mikedanese/log-service-account

log a message when we fall back to service account
pull/6/head
Jeff Lowdermilk 2015-06-22 13:20:43 -07:00
commit 7002ce2336
1 changed files with 3 additions and 0 deletions

View File

@ -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()
}