mirror of
https://github.com/fluxcd/flagger.git
synced 2026-08-29 02:37:31 +00:00
return an error for missing metric templates and count that towards the failure threshold
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
This commit is contained in:
@@ -306,6 +306,9 @@ func (c *Controller) runMetricChecks(canary *flaggerv1.Canary) bool {
|
||||
canary.Name, canary.Namespace, metric.Name, val, metric.Threshold)
|
||||
return false
|
||||
}
|
||||
} else if metric.Name != "request-success-rate" && metric.Name != "request-duration" {
|
||||
c.recordEventErrorf(canary, "Metric query failed for no usable metrics template were configured")
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user