Skip to content

Commit 521d40a

Browse files
authored
fix: helm: Set compactor addr for distributed mode. (#12748)
1 parent ff2063b commit 521d40a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

production/helm/loki/templates/_helpers.tpl

+6-1
Original file line numberDiff line numberDiff line change
@@ -931,13 +931,18 @@ enableServiceLinks: false
931931
{{/* Determine compactor address based on target configuration */}}
932932
{{- define "loki.compactorAddress" -}}
933933
{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}}
934+
{{- $isDistributed := eq (include "loki.deployment.isDistributed" .) "true "-}}
935+
{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}}
934936
{{- $compactorAddress := include "loki.backendFullname" . -}}
935937
{{- if and $isSimpleScalable .Values.read.legacyReadTarget -}}
936938
{{/* 2 target configuration */}}
937939
{{- $compactorAddress = include "loki.readFullname" . -}}
938-
{{- else if (not $isSimpleScalable) -}}
940+
{{- else if $isSingleBinary -}}
939941
{{/* single binary */}}
940942
{{- $compactorAddress = include "loki.singleBinaryFullname" . -}}
943+
{{/* distributed */}}
944+
{{- else if $isDistributed -}}
945+
{{- $compactorAddress = include "loki.compactorFullname" . -}}
941946
{{- end -}}
942947
{{- printf "http://%s:%s" $compactorAddress (.Values.loki.server.http_listen_port | toString) }}
943948
{{- end }}

0 commit comments

Comments
 (0)