From 3c7b50614c2f80fd0d92f9a92ab7d702108fba3b Mon Sep 17 00:00:00 2001 From: jsjolund Date: Thu, 9 Jan 2025 14:09:11 +0100 Subject: [PATCH] [dev-v2.10] Add metricRelabelings to rancher-istio ServiceMonitor --- .../105.5.0+up1.24.1/templates/service-monitors.yaml | 4 ++++ charts/rancher-istio/105.5.0+up1.24.1/values.yaml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/charts/rancher-istio/105.5.0+up1.24.1/templates/service-monitors.yaml b/charts/rancher-istio/105.5.0+up1.24.1/templates/service-monitors.yaml index c3d60c4fc..d561b40c4 100644 --- a/charts/rancher-istio/105.5.0+up1.24.1/templates/service-monitors.yaml +++ b/charts/rancher-istio/105.5.0+up1.24.1/templates/service-monitors.yaml @@ -29,6 +29,10 @@ spec: - sourceLabels: [__meta_kubernetes_pod_name] action: replace targetLabel: pod_name +{{- if .Values.kiali.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ toYaml .Values.kiali.serviceMonitor.metricRelabelings | indent 4 }} +{{- end }} --- apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor diff --git a/charts/rancher-istio/105.5.0+up1.24.1/values.yaml b/charts/rancher-istio/105.5.0+up1.24.1/values.yaml index 65914de4e..8db6bd13b 100644 --- a/charts/rancher-istio/105.5.0+up1.24.1/values.yaml +++ b/charts/rancher-istio/105.5.0+up1.24.1/values.yaml @@ -105,6 +105,8 @@ kiali: grafana: in_cluster_url: "http://rancher-monitoring-grafana.cattle-monitoring-system.svc:80" url: "http://rancher-monitoring-grafana.cattle-monitoring-system.svc:80" + serviceMonitor: + metricRelabelings: [] tracing: enabled: false