From 36c16de009a293bddf97624bc7b02d6268b07516 Mon Sep 17 00:00:00 2001 From: Hans Kristian Flaatten Date: Thu, 27 Jun 2024 13:55:04 +0200 Subject: [PATCH] Disable invalid Prometheus ServiceMonitor --- charts/bifrost/templates/backend-servicemonitor.yaml | 2 ++ charts/bifrost/values.yaml | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/charts/bifrost/templates/backend-servicemonitor.yaml b/charts/bifrost/templates/backend-servicemonitor.yaml index bdd07ad..da101aa 100644 --- a/charts/bifrost/templates/backend-servicemonitor.yaml +++ b/charts/bifrost/templates/backend-servicemonitor.yaml @@ -1,4 +1,5 @@ --- +{{- if .Values.metrics.enabled }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: @@ -15,3 +16,4 @@ spec: selector: matchLabels: {{- include "bifrost.selectorLabels" . | nindent 6 }} +{{- end }} \ No newline at end of file diff --git a/charts/bifrost/values.yaml b/charts/bifrost/values.yaml index 50e8433..15e8980 100644 --- a/charts/bifrost/values.yaml +++ b/charts/bifrost/values.yaml @@ -65,3 +65,9 @@ networkPolicy: allowDNS: true # apiServerCIDR is the CIDR of the Kubernetes API server. # apiServerCIDR: 1.2.3.4/32 + +metrics: + enabled: false + +alerts: + enabled: true \ No newline at end of file