mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-07 18:08:47 +02:00
Check etcd key availability for the new cluster
This commit is contained in:
@@ -3,6 +3,7 @@ package config
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/kelseyhightower/envconfig"
|
||||
@@ -39,6 +40,8 @@ type Config struct {
|
||||
DockerImage string `split_words:"true" default:"registry.opensource.zalan.do/acid/spilo-9.6:1.2-p12"`
|
||||
ServiceAccountName string `split_words:"true" default:"operator"`
|
||||
DbHostedZone string `split_words:"true" default:"db.example.com"`
|
||||
EtcdScope string `split_words:"true" default:"service"`
|
||||
DebugLogging bool `split_words:"true" default:"false"`
|
||||
}
|
||||
|
||||
func LoadFromEnv() *Config {
|
||||
@@ -47,6 +50,7 @@ func LoadFromEnv() *Config {
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("Can't read config: %v", err))
|
||||
}
|
||||
cfg.EtcdScope = strings.Trim(cfg.EtcdScope, "/")
|
||||
|
||||
return &cfg
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user