Issue 67308179: add support for getting credentials from env vars (#73) * [ISSUE-67308179] read envs * [ISSUE-67308179] update glide * [ISSUE-67308179] remove zombie code * [ISSUE-67308179] restore glide.yaml
diff --git a/init.go b/init.go index b7f470e..5118b47 100644 --- a/init.go +++ b/init.go
@@ -83,7 +83,6 @@ config.SetDefault(configPollInterval, 120*time.Second) config.SetDefault(configSnapshotProtocol, "sqlite") config.SetDefault(configDiagnosticMode, false) - name, errh := os.Hostname() if (errh != nil) && (len(config.GetString(configName)) == 0) { log.Errorf("Not able to get hostname for kernel. Please set '%s' property in config", configName) @@ -180,6 +179,15 @@ isOfflineMode = true } + if val, ok := os.LookupEnv(configConsumerKey); ok { + config.Set(configConsumerKey, val) + log.Debug("Got consumer key from env vars") + } + if val, ok := os.LookupEnv(configConsumerSecret); ok { + config.Set(configConsumerSecret, val) + log.Debug("Got consumer secret from env vars") + } + err := checkForRequiredValues() if err != nil { return err