diff --git a/charts/kyuubi/templates/kyuubi-servicemonitor.yaml b/charts/kyuubi/templates/kyuubi-servicemonitor.yaml index 11098a0eac2..937704bcc07 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.labels }} + {{- toYaml .Values.serviceMonitor.labels | nindent 4 }} + {{- end }} spec: selector: matchLabels: diff --git a/charts/kyuubi/values.yaml b/charts/kyuubi/values.yaml index 31d802fd4f4..b6b69621ec8 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 + labels: {} # Rules for the Prometheus Operator prometheusRule: