From ba72cb0de75b431c146d49b771291bd6cd4fb3b2 Mon Sep 17 00:00:00 2001 From: Ashok Siyani Date: Fri, 15 Nov 2024 09:05:30 +0000 Subject: [PATCH] allow one missed scan --- common/all.yaml.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/all.yaml.tmpl b/common/all.yaml.tmpl index 32b9344..2195ff2 100644 --- a/common/all.yaml.tmpl +++ b/common/all.yaml.tmpl @@ -186,16 +186,16 @@ groups: `kubectl --context={{ $labels.kubernetes_cluster }} -n {{ $labels.resource_namespace }} get events` - alert: KyvernoBackgroundScanCanary expr: sum by (kubernetes_cluster,resource_namespace,policy_name,rule_name) (increase(kyverno_policy_results_total{rule_name="detect-canary-configmap",rule_execution_cause="background_scan",rule_result="fail"}[1h])) == 0 - for: 10m + for: 1h10m labels: team: infra annotations: - summary: "Kyverno background scans canary alert is missing for last 10m" + summary: "Kyverno background scans canary alert is missing for more then 1h" description: | Background checks for rule: {{ $labels.rule_name }} of policy: {{ $labels.policy_name }} is failing to report failures under {{ $labels.resource_namespace }} namespace. This rule is created to always detect and alert on `kyverno-canary-resource` configmap. - + action: | Following troubleshooting steps might help... 1) check if `kyverno-canary-resource` configmap exits `kubectl --context={{ $labels.kubernetes_cluster }} -n kube-system get configmap kyverno-canary-resource`