Skip to content

Commit

Permalink
Add missing file / fix the type of the port field for servicemonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
mumoshu committed Feb 22, 2019
1 parent 6141d8d commit acb6279
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prometheus-process-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "0.4.0"
description: A Helm chart for prometheus process-exporter
name: prometheus-process-exporter
version: 0.2.0
version: 0.2.1
home: https://github.com/mumoshu/prometheus-process-exporter
sources:
- https://github.com/ncabatoff/process-exporter
Expand Down
30 changes: 30 additions & 0 deletions charts/prometheus-process-exporter/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{- if .Values.serviceMonitor.enabled }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "prometheus-process-exporter.fullname" . }}
labels:
chart: {{ template "prometheus-process-exporter.chart" . }}
app: {{ template "prometheus-process-exporter.name" . }}
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
{{- if .Values.serviceMonitor.labels }}
{{- toYaml .Values.serviceMonitor.labels | nindent 4 }}
{{- end }}
spec:
endpoints:
- interval: 10s
honorLabels: true
port: {{ .Values.service.port }}
path: /metrics
scheme: http
jobLabel: "{{ .Release.Name }}"
selector:
matchLabels:
app: {{ template "prometheus-process-exporter.name" . }}
release: "{{ .Release.Name }}"
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
{{- end }}

0 comments on commit acb6279

Please sign in to comment.