Skip to content

Commit

Permalink
return an error for missing metric templates and count that towards t…
Browse files Browse the repository at this point in the history
…he failure threshold

Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
  • Loading branch information
LiZhenCheng9527 committed Jan 17, 2024
1 parent b562ddd commit fea59a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/controller/scheduler_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ func (c *Controller) runMetricChecks(canary *flaggerv1.Canary) bool {
canary.Name, canary.Namespace, metric.Name, val, metric.Threshold)
return false
}
} else {
c.recordEventErrorf(canary, "Metric query failed for no usable metrics template were configured")
return false
}
}

Expand Down

0 comments on commit fea59a7

Please sign in to comment.