diff --git a/charts/kyuubi/templates/kyuubi-servicemonitor.yaml b/charts/kyuubi/templates/kyuubi-servicemonitor.yaml index 11098a0eac2..bc3e0c3c120 100644 --- a/charts/kyuubi/templates/kyuubi-servicemonitor.yaml +++ b/charts/kyuubi/templates/kyuubi-servicemonitor.yaml @@ -22,6 +22,9 @@ metadata: name: {{ .Release.Name }} labels: {{- include "kyuubi.labels" . | nindent 4 }} + {{- if .Values.serviceMonitor.additionalLabels }} + {{- toYaml .Values.serviceMonitor.additionalLabels | nindent 4 }} + {{- end }} spec: selector: matchLabels: diff --git a/charts/kyuubi/values.yaml b/charts/kyuubi/values.yaml index 31d802fd4f4..287eafb5a2a 100644 --- a/charts/kyuubi/values.yaml +++ b/charts/kyuubi/values.yaml @@ -297,6 +297,8 @@ serviceMonitor: # The endpoints section in a ServiceMonitor specifies the metrics information for each target endpoint. # This allows you to collect metrics from multiple Services across your Kubernetes cluster in a standardized and automated way. endpoints: [] + # Additional labels that can be used so ServiceMonitor will be discovered by Prometheus + additionalLabels: {} # Rules for the Prometheus Operator prometheusRule: