aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin/internal/utils.go
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2019-04-12 03:26:01 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-12 03:26:01 +0000
commit84c644d692929bbf041aae16c91e6dbf5fbdeb7f (patch)
tree95ab5b4771b6b82c7b9cd1494b701263e88a30b6 /src/k8splugin/internal/utils.go
parent3357aa8ad47c923021d53796c618c94f7c4ef37c (diff)
parent10337dd73e55ecf6327515e70a60aef4325af589 (diff)
Merge "Day 2 Configuration API's"
Diffstat (limited to 'src/k8splugin/internal/utils.go')
-rw-r--r--src/k8splugin/internal/utils.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/k8splugin/internal/utils.go b/src/k8splugin/internal/utils.go
index 4b28b688..3b08dd26 100644
--- a/src/k8splugin/internal/utils.go
+++ b/src/k8splugin/internal/utils.go
@@ -90,6 +90,17 @@ func CheckDatabaseConnection() error {
if err != nil {
return pkgerrors.Cause(err)
}
+ // TODO Convert these to configuration files instead of environment variables.
+ c := db.EtcdConfig{
+ Endpoint: os.Getenv("ETCD_ENDPOINT_IP"),
+ CertFile: os.Getenv("ETCD_CERT_FILE"),
+ KeyFile: os.Getenv("ETCD_KEY_FILE"),
+ CAFile: os.Getenv("ETCD_TRUSTED_CA_FILE"),
+ }
+ err = db.NewEtcdClient(nil, c)
+ if err != nil {
+ log.Printf("Etcd Client Initialization failed")
+ }
return nil
}