updated canary CRD and query rendering

Signed-off-by: Nelson Johnstone <93178586+njohnstone2@users.noreply.github.com>
This commit is contained in:
Nelson Johnstone
2023-02-08 11:41:58 +10:00
committed by Nelson Johnstone
parent 27eb21ecc8
commit 6786668684
8 changed files with 116 additions and 3 deletions
+2
View File
@@ -268,6 +268,8 @@ func (c *Controller) runMetricChecks(canary *flaggerv1.Canary) bool {
}
query, err := observers.RenderQuery(template.Spec.Query, toMetricModel(canary, metric.Interval, metric.TemplateVariables))
c.logger.With("canary", fmt.Sprintf("%s.%s", canary.Name, namespace)).
Debugf("Metric template %s.%s query: %s", metric.TemplateRef.Name, namespace, query)
if err != nil {
c.recordEventErrorf(canary, "Metric template %s.%s query render error: %v",
metric.TemplateRef.Name, namespace, err)