Check etcd key availability for the new cluster

This commit is contained in:
Murat Kabilov
2017-05-12 11:41:31 +02:00
parent 04ed22f73f
commit 852c5beae5
3 changed files with 28 additions and 4 deletions
+4
View File
@@ -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
}