From 9618d2ea0d507e2de225022c16af475e647ca503 Mon Sep 17 00:00:00 2001 From: Olga Mirensky Date: Thu, 23 May 2019 10:18:19 +1000 Subject: [PATCH] Fix promoting canary when max weight is not a multiple of step --- pkg/controller/scheduler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/scheduler.go b/pkg/controller/scheduler.go index fc1e86c6..2a1e5c6f 100644 --- a/pkg/controller/scheduler.go +++ b/pkg/controller/scheduler.go @@ -360,7 +360,7 @@ func (c *Controller) advanceCanary(name string, namespace string, skipLivenessCh c.recordEventInfof(cd, "Advance %s.%s canary weight %v", cd.Name, cd.Namespace, canaryWeight) // promote canary - if canaryWeight == maxWeight { + if canaryWeight >= maxWeight { c.recordEventInfof(cd, "Copying %s.%s template spec to %s.%s", cd.Spec.TargetRef.Name, cd.Namespace, primaryName, cd.Namespace) if err := c.deployer.Promote(cd); err != nil {