storage/kubernetes: Log before registering custom resources

Logging before attempting to make any connection to Kubernetes is useful when the connection hangs and dex is killed before it can log any errors.
This commit is contained in:
Chance Zibolski 2017-09-26 16:23:49 -07:00 committed by GitHub
parent 904c3facd9
commit 9d7b0b59bd
1 changed files with 1 additions and 0 deletions

View File

@ -85,6 +85,7 @@ func (c *Config) open(logger logrus.FieldLogger, errOnResources bool) (*client,
ctx, cancel := context.WithCancel(context.Background())
logger.Info("creating custom Kubernetes resources")
if !cli.registerCustomResources(c.UseTPR) {
if errOnResources {
cancel()