Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prometheus-elasticsearch-exporter] add ability to customize apiversion for pod/service monitor #4388

Merged
merged 10 commits into from
Mar 28, 2024
2 changes: 1 addition & 1 deletion charts/prometheus-elasticsearch-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Elasticsearch stats exporter for Prometheus
name: prometheus-elasticsearch-exporter
version: 5.6.0
version: 5.7.0
kubeVersion: ">=1.10.0-0"
appVersion: "v1.7.0"
home: https://github.com/prometheus-community/elasticsearch_exporter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- if and .Values.podMonitor.enabled .Values.serviceMonitor.enabled }}
{{- fail "Either .Values.podMonitor.enabled or .Values.serviceMonitor.enabled can be enabled at a time, but not both." }}
{{- else if .Values.podMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
apiVersion: {{ .Values.podMonitor.apiVersion }}
kind: PodMonitor
metadata:
name: {{ template "elasticsearch-exporter.fullname" . }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if .Values.serviceMonitor.enabled }}
---
apiVersion: monitoring.coreos.com/v1
apiVersion: {{ .Values.serviceMonitor.apiVersion }}
kind: ServiceMonitor
metadata:
name: {{ template "elasticsearch-exporter.fullname" . }}
Expand Down
2 changes: 2 additions & 0 deletions charts/prometheus-elasticsearch-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ serviceMonitor:
## https://github.com/coreos/prometheus-operator
##
enabled: false
apiVersion: "monitoring.coreos.com/v1"
# namespace: monitoring
labels: {}
interval: 10s
Expand All @@ -258,6 +259,7 @@ podMonitor:
## https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.PodMonitor
##
enabled: false
apiVersion: "monitoring.coreos.com/v1"
namespace: ""
labels: {}
interval: 60s
Expand Down
Loading