summaryrefslogtreecommitdiffstats
path: root/msb2pilot
diff options
context:
space:
mode:
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,
}, "")