Better logging for teams api calls

This commit is contained in:
Murat Kabilov
2017-05-12 11:41:32 +02:00
parent 5b66d0adba
commit 101dc06acb
5 changed files with 28 additions and 9 deletions
+1
View File
@@ -45,6 +45,7 @@ func New(controllerConfig *Config, operatorConfig *config.Config) *Controller {
logger.Level = logrus.DebugLevel
}
controllerConfig.TeamsAPIClient = teams.NewTeamsAPI(operatorConfig.TeamsAPIUrl, logger)
return &Controller{
Config: *controllerConfig,
opConfig: operatorConfig,
+1
View File
@@ -27,6 +27,7 @@ func (c *Controller) getOAuthToken() (string, error) {
credentialsSecret, err := c.KubeClient.Secrets(api.NamespaceDefault).Get(c.opConfig.OAuthTokenSecretName)
if err != nil {
c.logger.Debugf("Oauth token secret name: %s", c.opConfig.OAuthTokenSecretName)
return "", fmt.Errorf("Can't get credentials Secret: %s", err)
}
data := credentialsSecret.Data