From 6681ed48ed3d0093a00aa5ac78b3ccacd735a022 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Mon, 30 Oct 2023 03:19:37 +0100
Subject: [PATCH] fix(blog): Fix SLO by using optional vector

---
 apps/k8s01/blog/slo.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/k8s01/blog/slo.yaml b/apps/k8s01/blog/slo.yaml
index c65a3569f..df9221450 100644
--- a/apps/k8s01/blog/slo.yaml
+++ b/apps/k8s01/blog/slo.yaml
@@ -11,7 +11,7 @@ spec:
       description: "Blog: SLO based on availability for HTTP request responses."
       sli:
         events:
-          errorQuery: sum(rate(nginx_ingress_controller_requests{exported_namespace="blog",ingress="blog",status=~"(5..|429)"}[{{.window}}]))
+          errorQuery: sum(rate(nginx_ingress_controller_requests{exported_namespace="blog",ingress="blog",status=~"(5..|429)"}[{{.window}}])) OR vector(0)
           totalQuery: sum(rate(nginx_ingress_controller_requests{exported_namespace="blog",ingress="blog"}[{{.window}}])) > 0 OR vector(1)
       alerting:
         name: BlogHighErrorRate
-- 
GitLab