From 758beae75a526617226cc62d03219a6331fdc37f Mon Sep 17 00:00:00 2001 From: Tom Martensen Date: Mon, 13 Jul 2026 10:47:19 +0200 Subject: [PATCH] fix: add release labels to servicemonitors --- chart/infra-server/templates/monitoring/rules.yaml | 6 ++++-- chart/infra-server/templates/monitoring/services.yaml | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/chart/infra-server/templates/monitoring/rules.yaml b/chart/infra-server/templates/monitoring/rules.yaml index 28330aa7c..b2c555828 100644 --- a/chart/infra-server/templates/monitoring/rules.yaml +++ b/chart/infra-server/templates/monitoring/rules.yaml @@ -5,13 +5,15 @@ kind: PrometheusRule metadata: name: argo-workflow-failures namespace: monitoring + labels: + release: {{ .Release.Name }} spec: groups: - name: Workflow failures interval: 30s rules: - alert: Workflow Error - expr: increase(argo_workflows_gauge{status="Error"}[5m]) > 0 + expr: increase(argo_workflows_gauge{phase="Error"}[5m]) > 0 for: 1m annotations: summary: A workflow has errored @@ -21,7 +23,7 @@ spec: namespace: monitoring environment: {{ .Values.environment }} - alert: Workflow Failure - expr: increase(argo_workflows_gauge{status="Failed"}[5m]) > 0 + expr: increase(argo_workflows_gauge{phase="Failed"}[5m]) > 0 for: 1m annotations: summary: A workflow has failed. diff --git a/chart/infra-server/templates/monitoring/services.yaml b/chart/infra-server/templates/monitoring/services.yaml index 381286da9..ff78a8c75 100644 --- a/chart/infra-server/templates/monitoring/services.yaml +++ b/chart/infra-server/templates/monitoring/services.yaml @@ -1,3 +1,4 @@ +{{- if .Values.monitoring.enabled }} --- apiVersion: v1 kind: Service @@ -30,3 +31,4 @@ spec: targetPort: 9101 selector: app.kubernetes.io/name: infra-server +{{- end }}