Skip to content

Commit

Permalink
[prometheus-elasticsearch-exporter] add ability to customize apiversi…
Browse files Browse the repository at this point in the history
…on for pod/service monitor (#4388)

* Adding support for azure managed prometheus

Signed-off-by: Rashmi Chandrashekar <[email protected]>

* addressing comments

Signed-off-by: Rashmi Chandrashekar <[email protected]>

* removing azmon value flag

Signed-off-by: Rashmi Chandrashekar <[email protected]>

* removing add

Signed-off-by: Rashmi Chandrashekar <[email protected]>

* removing checks

Signed-off-by: Rashmi Chandrashekar <[email protected]>

---------

Signed-off-by: Rashmi Chandrashekar <[email protected]>
  • Loading branch information
rashmichandrashekar authored Mar 28, 2024
1 parent b3aa137 commit e908c1a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
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

0 comments on commit e908c1a

Please sign in to comment.