Use canary state constants in recorder

This commit is contained in:
stefanprodan
2018-11-27 17:34:48 +02:00
parent 1b2b13e77f
commit f3904ea099
+2 -2
View File
@@ -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