Respond to code review

This commit is contained in:
Sergey Dudoladov
2018-02-20 14:43:02 +01:00
parent b1fae716b1
commit dcfc9925f6
7 changed files with 40 additions and 63 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ type Config struct {
Resources
Auth
Scalyr
WatchedNamespace string `name:"watched_namespace"` // may be v1.NamespaceAll, meaning watch all namespaces
WatchedNamespace string `name:"watched_namespace"` // may be "*", meaning watch all namespaces
EtcdHost string `name:"etcd_host" default:"etcd-client.default.svc.cluster.local:2379"`
DockerImage string `name:"docker_image" default:"registry.opensource.zalan.do/acid/spiloprivate-9.6:1.2-p4"`
ServiceAccountName string `name:"service_account_name" default:"operator"`
+7
View File
@@ -119,3 +119,10 @@ func MapContains(haystack, needle map[string]string) bool {
return true
}
func Coalesce(val, defaultVal string) string {
if val == "" {
return defaultVal
}
return val
}