summaryrefslogtreecommitdiffstats
path: root/msb2pilot
diff options
context:
space:
mode:
authorLvbo163 <lv.bo163@zte.com.cn>2018-08-14 17:19:48 +0800
committerLvbo163 <lv.bo163@zte.com.cn>2018-08-14 17:19:48 +0800
commit2a86ab8a6793d2bfa3b87076d5eaf468c15c80cb (patch)
treeb930d867fdde047bc40806951cc02a83a585250f /msb2pilot
parent3382ec565cf9e54c0c8fe8830f514297dce2d184 (diff)
support in-cluter k8s
Issue-ID: MSB-277 Change-Id: Iecf3aafab44564259e621a4fc116a2bd1a5c08ef Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
Diffstat (limited to 'msb2pilot')
-rw-r--r--msb2pilot/src/msb2pilot/pilot/controller.go8
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,
}, "")