Fix canary weight max value

This commit is contained in:
stefanprodan
2019-09-24 10:16:22 +03:00
parent 1b2e0481b9
commit 2ff86fa56e
+2 -2
View File
@@ -434,8 +434,8 @@ func (c *Controller) advanceCanary(name string, namespace string, skipLivenessCh
primaryWeight = 0
}
canaryWeight += cd.Spec.CanaryAnalysis.StepWeight
if primaryWeight > 100 {
primaryWeight = 100
if canaryWeight > 100 {
canaryWeight = 100
}
if err := meshRouter.SetRoutes(cd, primaryWeight, canaryWeight); err != nil {