Skip to content

Commit

Permalink
add svm support for prometheus-statsd-exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
abarrak committed Apr 21, 2024
1 parent d07618a commit af3757d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
28 changes: 28 additions & 0 deletions stable/prometheus-statsd-exporter/templates/servicemonitor.yaml
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 }}
6 changes: 6 additions & 0 deletions stable/prometheus-statsd-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ securityContext: {}
service:
type: ClusterIP

metrics:
enabled: false
additionalLabels: {}
scrapeInterval: 30s
scrapeTimeout: 10s

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down

0 comments on commit af3757d

Please sign in to comment.