Send the error message to user when enabling canary feature fails. (#990)

* Send the error message to user when enabling canary feature fails.
* Fix controller doesn’t reply canary error when promClient tries connect to invalid prometheus server
This commit is contained in:
smruthi2187
2019-01-14 22:43:27 +08:00
committed by Ta-Ching Chen
parent 89081b087b
commit db5165e032
8 changed files with 60 additions and 30 deletions
+6 -1
View File
@@ -62,11 +62,16 @@ func MakeCanaryConfigMgr(fissionClient *crd.FissionClient, kubeClient *kubernete
}
}
promClient, err := MakePrometheusClient(prometheusSvc)
if err != nil {
return nil, err
}
configMgr := &canaryConfigMgr{
fissionClient: fissionClient,
kubeClient: kubeClient,
crdClient: crdClient,
promClient: MakePrometheusClient(prometheusSvc),
promClient: promClient,
canaryCfgCancelFuncMap: makecanaryConfigCancelFuncMap(),
}