From ef07e212d7e2ddf0cb55ccdeed9704bdd324db42 Mon Sep 17 00:00:00 2001 From: Chris Werner Rau Date: Tue, 17 Dec 2024 14:41:09 +0100 Subject: [PATCH] fix(base-cluster/kdave): deploy wrapped ServiceMonitor --- charts/base-cluster/templates/monitoring/kdave/kdave.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/base-cluster/templates/monitoring/kdave/kdave.yaml b/charts/base-cluster/templates/monitoring/kdave/kdave.yaml index 738121d5b..5f9b192e5 100644 --- a/charts/base-cluster/templates/monitoring/kdave/kdave.yaml +++ b/charts/base-cluster/templates/monitoring/kdave/kdave.yaml @@ -30,12 +30,18 @@ spec: apiVersionsInspector: enabled: false --- +{{- include "base-cluster.helm.resourceWithDependencies" (dict "name" "kdave-servicemonitor" "resource" (include "base-cluster.kdave.serviceMonitor" (dict "context" .)) "dependencies" (dict "monitoring" "kube-prometheus-stack") "context" $ "additionalLabels" (dict "app.kubernetes.io/component" "kdave")) | nindent 0 }} +{{- end -}} + + +{{- define "base-cluster.kdave.serviceMonitor" -}} + {{- $_ := mustMerge . (pick .context "Values") -}} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: kdave namespace: monitoring - labels: {{- include "common.labels.standard" $ | nindent 4 }}{{- toYaml .Values.monitoring.labels | nindent 4 }} + labels: {{- include "common.helm.labels" (dict) | nindent 4 }}{{- toYaml .Values.monitoring.labels | nindent 4 }} app.kubernetes.io/component: kdave app.kubernetes.io/part-of: monitoring spec: