Skip to content

Commit

Permalink
Add release name to prometheus service name. (#1174)
Browse files Browse the repository at this point in the history
  • Loading branch information
rally25rs authored and cyriltovena committed Oct 18, 2019
1 parent 00185f8 commit fa79c24
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 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.17.2
version: 0.17.3
appVersion: v0.3.0
kubeVersion: "^1.10.0-0"
description: "Loki: like Prometheus, but for logs."
Expand Down
8 changes: 8 additions & 0 deletions production/helm/loki-stack/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,11 @@ Create chart name and version as used by the chart label.
{{- define "loki-stack.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Override the naming defined by the prometheus chart.
Added as a fix for https://github.com/grafana/loki/issues/1169
*/}}
{{- define "prometheus.fullname" -}}
{{- printf "%s-%s" .Release.Name "prometheus-server" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
2 changes: 1 addition & 1 deletion production/helm/loki-stack/templates/datasources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ data:
- name: Prometheus
type: prometheus
access: proxy
url: http://{{ .Values.prometheus.server.fullnameOverride }}:{{ .Values.prometheus.server.service.servicePort }}
url: http://{{ include "prometheus.fullname" .}}:{{ .Values.prometheus.server.service.servicePort }}
version: 1
{{- end }}
{{- end }}
2 changes: 0 additions & 2 deletions production/helm/loki-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ grafana:

prometheus:
enabled: false
server:
fullnameOverride: prometheus-server

0 comments on commit fa79c24

Please sign in to comment.