-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stable/prometheus-statsd-exporter] add ServiceMonitor support for pr…
…ometheus-statsd-exporter (#578) * add svm support for prometheus-statsd-exporter * docs: add metrics vars docs for prometheus-statsd-exporter * bump chart version * fix docs linter * bump version
- Loading branch information
Showing
4 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
stable/prometheus-statsd-exporter/templates/servicemonitor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{{- if and .Values.metrics.enabled (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ include "prometheus-statsd-exporter.fullname" . }} | ||
labels: | ||
name: {{ include "prometheus-statsd-exporter.fullname" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- with .Values.metrics.additionalLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
namespaceSelector: | ||
matchNames: | ||
- {{ .Release.Namespace }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ include "prometheus-statsd-exporter.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
endpoints: | ||
- port: frontend | ||
{{- if .Values.metrics.scrapeInterval }} | ||
interval: {{ .Values.metrics.scrapeInterval }} | ||
{{- end }} | ||
{{- if .Values.metrics.scrapeTimeout }} | ||
scrapeTimeout: {{ .Values.metrics.scrapeTimeout }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters