loki icon indicating copy to clipboard operation
loki copied to clipboard

[helm] Error starting SimpleScalable without Gateway (using Ingress)

Open jmtt89 opened this issue 1 year ago • 3 comments

The definition of loki.host its wrong when use deploymentMode SimpleScalable and ingress (gateway off)

{{/* Determine the public host for the Loki cluster */}}
{{- define "loki.host" -}}
{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}}
{{- $url := printf "%s.%s.svc.%s.:%s" (include "loki.gatewayFullname" .) .Release.Namespace .Values.global.clusterDomain (.Values.gateway.service.port | toString)  }}
{{- if and $isSingleBinary (not .Values.gateway.enabled)  }}
  {{- $url = printf "%s.%s.svc.%s.:%s" (include "loki.singleBinaryFullname" .) .Release.Namespace .Values.global.clusterDomain (.Values.loki.server.http_listen_port | toString) }}
{{- end }}
{{- printf "%s" $url -}}
{{- end -}}

At end of that execution, the url use loki.gatewayFullname for generate the loki host

{{/*
gateway fullname
*/}}
{{- define "loki.gatewayFullname" -}}
{{ include "loki.fullname" . }}-gateway
{{- end }}

but that service does not exist when use ingress instead gateway,

{{- if .Values.gateway.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "loki.gatewayFullname" . }}
  ...
{{- end }}

i think need to use read service instead

jmtt89 avatar May 20 '24 19:05 jmtt89

This issue also hits, Loki Canary, which just fails because it tries to hit the non-existent gateway, and there are no options to override it in the chart.

LuxTheDude avatar Aug 26 '24 10:08 LuxTheDude

Having the same issue. Very surprised that such important and easy noticeable issue remains unaddressed for so long.

ssichynskyi avatar Sep 19 '24 13:09 ssichynskyi

Same issue

watkinsmike avatar Oct 16 '24 17:10 watkinsmike

At this same code-excerpt : does any else ran into the issue with this dot here ?

Image

vcsekhar avatar May 05 '25 22:05 vcsekhar