Merge pull request #190 from olga-mir/fix-promotion-usecase

Fix promoting canary when max weight is not a multiple of step
This commit is contained in:
Stefan Prodan
2019-05-23 15:13:50 +02:00
committed by GitHub
+1 -1
View File
@@ -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 {