Skip to content

Commit

Permalink
Helm chart: Added service monitor (grafana#824)
Browse files Browse the repository at this point in the history
* Helm chart: Added service monitor

* Bumped loki-stack chart version

* Bumped loki chart version
  • Loading branch information
amartorelli authored and cyriltovena committed Aug 1, 2019
1 parent b6a4949 commit 9736a83
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion production/helm/loki-stack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: loki-stack
version: 0.12.0
version: 0.13.0
appVersion: 0.0.1
kubeVersion: "^1.10.0-0"
description: "Loki: like Prometheus, but for logs."
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: loki
version: 0.11.0
version: 0.12.0
appVersion: 0.0.1
kubeVersion: "^1.10.0-0"
description: "Loki: like Prometheus, but for logs."
Expand Down
24 changes: 24 additions & 0 deletions production/helm/loki/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{- if .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "loki.fullname" . }}
labels:
app: {{ template "loki.name" . }}
chart: {{ template "loki.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
selector:
matchLabels:
app: {{ template "loki.name" . }}
release: {{ .Release.Name | quote }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace | quote }}
endpoints:
- port: http-metrics
{{- if .Values.serviceMonitor.interval }}
interval: {{ .Values.serviceMonitor.interval }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions production/helm/loki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,7 @@ podDisruptionBudget: {}

updateStrategy:
type: RollingUpdate

serviceMonitor:
enabled: false
interval: ""

0 comments on commit 9736a83

Please sign in to comment.