This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new ee7e23469e [KYUUBI #6845] Support additional labels for PodMonitor to
be discovered by Prometheus
ee7e23469e is described below
commit ee7e23469e0971386509b3e561c48df498fa4f25
Author: dongsj <[email protected]>
AuthorDate: Tue Dec 10 13:43:33 2024 +0800
[KYUUBI #6845] Support additional labels for PodMonitor to be discovered by
Prometheus
### Why are the changes needed?
the prometheus can not discover the podMonitor created by kyuubi helm chart.
### How was this patch tested?
1. enable pod monitor:
```
metrics:
# Enable metrics system, used for 'kyuubi.metrics.enabled' property
enabled: true
# A comma-separated list of metrics reporters, used for
'kyuubi.metrics.reporters' property
reporters: PROMETHEUS
# Prometheus port, used for 'kyuubi.metrics.prometheus.port' property
prometheusPort: 10019
# PodMonitor by Prometheus Operator
podMonitor:
# Enable PodMonitor creation
enabled: true
# List of pod endpoints serving metrics to be scraped by Prometheus,
see Prometheus Operator docs for more details
#podMetricsEndpoints: []
podMetricsEndpoints:
- path: /metrics
port: prometheus
```
2. Helm install kyuubi .
3. check prometheus web ui.
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #6845 from eric9204/add-lab-to-pm.
Closes #6845
4d713a06c [Cheng Pan] Update charts/kyuubi/values.yaml
f8fa51f28 [dongsj] resolve conflicts with master
Lead-authored-by: dongsj <[email protected]>
Co-authored-by: Cheng Pan <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
---
charts/kyuubi/templates/kyuubi-podmonitor.yaml | 3 +++
charts/kyuubi/values.yaml | 2 ++
2 files changed, 5 insertions(+)
diff --git a/charts/kyuubi/templates/kyuubi-podmonitor.yaml
b/charts/kyuubi/templates/kyuubi-podmonitor.yaml
index 125ecac6f6..ad154af27e 100644
--- a/charts/kyuubi/templates/kyuubi-podmonitor.yaml
+++ b/charts/kyuubi/templates/kyuubi-podmonitor.yaml
@@ -22,6 +22,9 @@ metadata:
name: {{ .Release.Name }}
labels:
{{- include "kyuubi.labels" . | nindent 4 }}
+ {{- if .Values.metrics.podMonitor.labels }}
+ {{- toYaml .Values.metrics.podMonitor.labels | nindent 4 }}
+ {{- end }}
spec:
selector:
matchLabels:
diff --git a/charts/kyuubi/values.yaml b/charts/kyuubi/values.yaml
index 065aafecf7..4922a61779 100644
--- a/charts/kyuubi/values.yaml
+++ b/charts/kyuubi/values.yaml
@@ -285,6 +285,8 @@ metrics:
# podMetricsEndpoints:
# - path: /metrics
# port: prometheus
+ # Additional labels for PodMonitor to be discovered by Prometheus
+ labels: {}
# ServiceMonitor by Prometheus Operator
serviceMonitor: