Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions production/helm/loki/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Entries should include a reference to the pull request that introduced the chang

## Unreleased

- [CHANGE] `nameOverride` now passed through helm tpl function [#19590](https://github.com/grafana/loki/pull/19590).

## 6.44.0

- [DEPRECATION] The Loki Helm chart uses MinIO as an object store. MinIO will be removed from the Helm Charts in a future release. See [this issue](https://github.com/minio/minio/issues/21647) for more information. The Loki team is still investigating alternatives to replace MinIO.
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/ci/non-default-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
deploymentMode: Distributed
nameOverride: '{{ $.Release.Name }}'
loki:
commonConfig:
replication_factor: 1
Expand Down
28 changes: 21 additions & 7 deletions production/helm/loki/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#sy
Expand the name of the chart.
*/}}
{{- define "loki.name" -}}
{{- $default := ternary "enterprise-logs" "loki" .Values.enterprise.enabled }}
{{- coalesce .Values.nameOverride $default | trunc 63 | trimSuffix "-" }}
{{- $name := ternary "enterprise-logs" "loki" .Values.enterprise.enabled }}
{{- if .Values.nameOverride }}
{{- $name = (tpl .Values.nameOverride $) }}
{{- end }}
{{- $name | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Expand All @@ -32,7 +35,7 @@ singleBinary fullname
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- $name := (include "loki.name" $) -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
Expand Down Expand Up @@ -149,10 +152,12 @@ app.kubernetes.io/instance: {{ .Release.Name }}
Create the name of the service account to use
*/}}
{{- define "loki.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "loki.name" .) .Values.serviceAccount.name }}
{{- if .Values.serviceAccount.name }}
{{- tpl .Values.serviceAccount.name $ }}
{{- else if .Values.serviceAccount.create -}}
{{- include "loki.fullname" . }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- "default" }}
{{- end -}}
{{- end -}}

Expand Down Expand Up @@ -668,7 +673,16 @@ Create the service endpoint including port for MinIO.

{{/* Configure the correct name for the memberlist service */}}
{{- define "loki.memberlist" -}}
{{ include "loki.name" . }}-memberlist
{{- if .Values.memberlist.service.name }}
{{- tpl .Values.memberlist.service.name $ }}
{{- else }}
{{- include "loki.fullname" . }}-memberlist
{{- end -}}
{{- end -}}

{{/* Configure the correct name for the runtime config */}}
{{- define "loki.runtime.name" -}}
{{ include "loki.fullname" . }}-runtime
{{- end -}}

{{/* Determine the public host for the Loki cluster */}}
Expand Down
Loading