From 2ff86fa56ea94d38322a5c5e8357732ff2d5daf0 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Tue, 24 Sep 2019 10:16:22 +0300 Subject: [PATCH] Fix canary weight max value --- pkg/controller/scheduler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/scheduler.go b/pkg/controller/scheduler.go index 2c280eb5..d3d0294a 100644 --- a/pkg/controller/scheduler.go +++ b/pkg/controller/scheduler.go @@ -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 {