Skip to content

Commit

Permalink
feat: add metricRelabelings option for service monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
maso7 committed May 23, 2023
1 parent 0dac889 commit 9a2db9d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions charts/ec2-price-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: ec2-price-exporter
description: Prometheus exporter for spot and on-demand instance prices
type: application
version: 0.1.0
appVersion: "0.2.0"
version: 0.2.0
appVersion: "0.2.2"
sources:
- https://github.com/pixelfederation/ec2-price-exporter
- https://github.com/AndreZiviani/ec2-price-exporter
Expand Down
4 changes: 4 additions & 0 deletions charts/ec2-price-exporter/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ spec:
endpoints:
- targetPort: {{ .Values.service.port }}
path: {{ .Values.serviceMonitor.metricsPath }}
{{- with .Values.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{ toYaml . | nindent 8 }}
{{- end }}
jobLabel: {{ include "ec2-price-exporter.fullname" . }}
namespaceSelector:
matchNames:
Expand Down
3 changes: 2 additions & 1 deletion charts/ec2-price-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ image:
repository: ghcr.io/pixelfederation/ec2-price-exporter
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "v0.2.0"
tag: "v0.2.2"

imagePullSecrets: []
nameOverride: ""
Expand Down Expand Up @@ -78,6 +78,7 @@ serviceMonitor:
enabled: false
metricsPath: "/metrics"
interval: 60s
metricRelabelings: []

nodeSelector: {}

Expand Down

0 comments on commit 9a2db9d

Please sign in to comment.