Skip to content

Commit

Permalink
feat(chart): add metricRelabelings and relabelings on serviceMoni…
Browse files Browse the repository at this point in the history
…tor (#85)

* feat(chart): add `metricRelabelings` and `relabelings` on serviceMonitor

Signed-off-by: Iván Alejandro Marugán <hello@ialejandro.rocks>
  • Loading branch information
ialejandro authored Jul 12, 2022
1 parent 6dbacaa commit fb060d7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions helm/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ spec:
{{- with .Values.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ . }}
{{- end }}
{{- if .Values.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{- toYaml .Values.serviceMonitor.metricRelabelings | nindent 4 }}
{{- end }}
{{- if .Values.serviceMonitor.relabelings }}
relabelings:
{{- toYaml .Values.serviceMonitor.relabelings | nindent 4 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
Expand Down
2 changes: 2 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ serviceMonitor:
scrapeTimeout:
namespace:
additionalLabels: {}
metricRelabelings: []
relabelings: []

grafanaDashboard:
# Specifies whether a Grafana dashboard should be created
Expand Down

0 comments on commit fb060d7

Please sign in to comment.