diff options
author | Zhaoxing Meng <meng.zhaoxing1@zte.com.cn> | 2018-08-14 14:04:17 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-08-14 14:04:17 +0000 |
commit | 532aade4053b4fb1ebccfbb981f80b47af28735e (patch) | |
tree | f64a5f3623a7ab85de08fff41665d4addee056fa | |
parent | 906880d1cf1fb087c121122504a8cd6a026cdd62 (diff) | |
parent | 2a86ab8a6793d2bfa3b87076d5eaf468c15c80cb (diff) |
Merge "support in-cluter k8s"
-rw-r--r-- | msb2pilot/src/msb2pilot/pilot/controller.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/msb2pilot/src/msb2pilot/pilot/controller.go b/msb2pilot/src/msb2pilot/pilot/controller.go index bc79cc5..4070ad3 100644 --- a/msb2pilot/src/msb2pilot/pilot/controller.go +++ b/msb2pilot/src/msb2pilot/pilot/controller.go @@ -63,10 +63,14 @@ func Save(operation Operation, configs []model.Config) []*model.Config { } func init() { - updateK8sAddress(configPath) + var k8sConfigPath string + k8sAddr, _ := updateK8sAddress(configPath) + if k8sAddr != "" { + k8sConfigPath = configPath + } var err error - client, err = crd.NewClient(configPath, "", model.ConfigDescriptor{ + client, err = crd.NewClient(k8sConfigPath, "", model.ConfigDescriptor{ model.VirtualService, model.DestinationRule, }, "") |