From 0894304fce9d289d586d1dade38c6574c6c47f0b Mon Sep 17 00:00:00 2001 From: Michael Parker Date: Thu, 9 Jan 2020 10:44:15 -0600 Subject: [PATCH] use canary copy for new revision notification --- pkg/controller/scheduler.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/controller/scheduler.go b/pkg/controller/scheduler.go index bc2a6a88..94e8a3ae 100644 --- a/pkg/controller/scheduler.go +++ b/pkg/controller/scheduler.go @@ -645,9 +645,12 @@ func (c *Controller) checkCanaryStatus(canary *flaggerv1.Canary, canaryControlle } if shouldAdvance { - c.recordEventInfof(canary, "New revision detected! Scaling up %s.%s", canary.Spec.TargetRef.Name, canary.Namespace) - c.sendNotification(canary, "New revision detected, starting canary analysis.", + canaryProgressing := canary.DeepCopy() + canaryProgressing.Status.Phase = flaggerv1.CanaryPhaseProgressing + c.recordEventInfof(canaryProgressing, "New revision detected! Scaling up %s.%s", canaryProgressing.Spec.TargetRef.Name, canaryProgressing.Namespace) + c.sendNotification(canaryProgressing, "New revision detected, starting canary analysis.", true, false) + if err := canaryController.ScaleFromZero(canary); err != nil { c.recordEventErrorf(canary, "%v", err) return false