mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-20 13:28:31 +02:00
Overwrite scalyr api key if the relevant env variable is present in the operator pod
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user