Merge pull request #205 from zalando-incubator/scalyr-api-key

Overwrite scalyr api key if the relevant env var is present in the operator pod
This commit is contained in:
zerg-junior 2018-01-12 15:17:05 +01:00 committed by GitHub
commit 8c9033df28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package controller
import ( import (
"fmt" "fmt"
"os"
"sync" "sync"
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
@ -107,6 +108,11 @@ func (c *Controller) initOperatorConfig() {
} }
c.opConfig = config.NewFromMap(configMapData) c.opConfig = config.NewFromMap(configMapData)
scalyrAPIKey := os.Getenv("SCALYR_API_KEY")
if scalyrAPIKey != "" {
c.opConfig.ScalyrAPIKey = scalyrAPIKey
}
} }
func (c *Controller) initController() { func (c *Controller) initController() {