From f3904ea0998c3611999df0912788c3d739f23d3e Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Tue, 27 Nov 2018 17:34:48 +0200 Subject: [PATCH] Use canary state constants in recorder --- pkg/controller/recorder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/recorder.go b/pkg/controller/recorder.go index e293989f..717b4091 100644 --- a/pkg/controller/recorder.go +++ b/pkg/controller/recorder.go @@ -73,9 +73,9 @@ func (cr *CanaryRecorder) SetTotal(namespace string, total int) { func (cr *CanaryRecorder) SetStatus(cd *flaggerv1.Canary) { status := 1 switch cd.Status.State { - case "running": + case flaggerv1.CanaryRunning: status = 0 - case "failed": + case flaggerv1.CanaryFailed: status = 2 default: status = 1