From c692d2b4a0a65d02fe857a4595d93145463c407f Mon Sep 17 00:00:00 2001 From: Romain BELORGEY Date: Mon, 11 Dec 2023 11:09:19 +0100 Subject: [PATCH] Fix nginx config when ruler is disabled Signed-off-by: Romain BELORGEY --- charts/loki-distributed/Chart.yaml | 2 +- charts/loki-distributed/values.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/loki-distributed/Chart.yaml b/charts/loki-distributed/Chart.yaml index f800a83254..1e25cdfe7b 100644 --- a/charts/loki-distributed/Chart.yaml +++ b/charts/loki-distributed/Chart.yaml @@ -3,7 +3,7 @@ name: loki-distributed description: Helm chart for Grafana Loki in microservices mode type: application appVersion: 2.9.2 -version: 0.77.0 +version: 0.78.0 home: https://grafana.github.io/helm-charts sources: - https://github.com/grafana/loki diff --git a/charts/loki-distributed/values.yaml b/charts/loki-distributed/values.yaml index 97faee7d98..e98d71494a 100644 --- a/charts/loki-distributed/values.yaml +++ b/charts/loki-distributed/values.yaml @@ -1278,6 +1278,7 @@ gateway: } # Ruler + {{- if .Values.ruler.enabled }} location ~ /prometheus/api/v1/alerts.* { proxy_pass http://{{ include "loki.rulerFullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:3100$request_uri; } @@ -1290,6 +1291,7 @@ gateway: location ~ /api/prom/alerts.* { proxy_pass http://{{ include "loki.rulerFullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:3100$request_uri; } + {{- end }} location ~ /api/prom/.* { set $api_prom_backend http://{{ include "loki.queryFrontendFullname" . }}-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }};