From 858be2c4b37631b2fd25713392b2acb3ede30395 Mon Sep 17 00:00:00 2001 From: Olivier Roques Date: Fri, 4 Oct 2024 11:46:55 +0200 Subject: [PATCH] fix(helm): add missing log deletion endpoint to native ingress paths Fix #14389 --- docs/sources/setup/install/helm/reference.md | 14 ++++++++++++++ production/helm/loki/templates/_helpers.tpl | 5 +++++ production/helm/loki/values.yaml | 6 ++++++ 3 files changed, 25 insertions(+) diff --git a/docs/sources/setup/install/helm/reference.md b/docs/sources/setup/install/helm/reference.md index 43d246ec1fad..b595c6c33541 100644 --- a/docs/sources/setup/install/helm/reference.md +++ b/docs/sources/setup/install/helm/reference.md @@ -5620,6 +5620,9 @@ null "ingressClassName": "", "labels": {}, "paths": { + "compactor": [ + "/loki/api/v1/delete" + ], "distributor": [ "/api/prom/push", "/loki/api/v1/push", @@ -5668,6 +5671,17 @@ null "loki.example.com" ] + + + + ingress.paths.compactor + list + Paths that are exposed by Loki Compactor. If deployment mode is Distributed, the requests are forwarded to the service: `{{"loki.compactorFullname"}}`. If deployment mode is SimpleScalable, the requests are forwarded to k8s service: `{{"loki.backendFullname"}}`. If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service: `{{"loki.singleBinaryFullname"}}` +
+[
+  "/loki/api/v1/delete"
+]
+
diff --git a/production/helm/loki/templates/_helpers.tpl b/production/helm/loki/templates/_helpers.tpl index f302bc5a621a..c1f2917cce46 100644 --- a/production/helm/loki/templates/_helpers.tpl +++ b/production/helm/loki/templates/_helpers.tpl @@ -600,6 +600,8 @@ Ingress service paths for distributed deployment {{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $queryFrontendServiceName "paths" .Values.ingress.paths.queryFrontend )}} {{- $rulerServiceName := include "loki.rulerFullname" . }} {{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $rulerServiceName "paths" .Values.ingress.paths.ruler)}} +{{- $compactorServiceName := include "loki.compactorFullname" . }} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $compactorServiceName "paths" .Values.ingress.paths.compactor)}} {{- end -}} {{/* @@ -612,6 +614,7 @@ Ingress service paths for legacy simple scalable deployment when backend compone {{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $writeServiceName "paths" .Values.ingress.paths.distributor )}} {{- $backendServiceName := include "loki.backendFullname" . }} {{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $backendServiceName "paths" .Values.ingress.paths.ruler )}} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $backendServiceName "paths" .Values.ingress.paths.compactor )}} {{- end -}} {{/* @@ -621,6 +624,7 @@ Ingress service paths for legacy simple scalable deployment {{- $readServiceName := include "loki.readFullname" . }} {{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $readServiceName "paths" .Values.ingress.paths.queryFrontend )}} {{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $readServiceName "paths" .Values.ingress.paths.ruler )}} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $readServiceName "paths" .Values.ingress.paths.compactor )}} {{- $writeServiceName := include "loki.writeFullname" . }} {{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $writeServiceName "paths" .Values.ingress.paths.distributor )}} {{- end -}} @@ -633,6 +637,7 @@ Ingress service paths for single binary deployment {{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $serviceName "paths" .Values.ingress.paths.distributor )}} {{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $serviceName "paths" .Values.ingress.paths.queryFrontend )}} {{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $serviceName "paths" .Values.ingress.paths.ruler )}} +{{- include "loki.ingress.servicePath" (dict "ctx" . "serviceName" $serviceName "paths" .Values.ingress.paths.compactor )}} {{- end -}} {{/* diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index 3185f780ccd2..5c5682ac7e09 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -1213,6 +1213,12 @@ ingress: - /loki/api/v1/rules - /prometheus/api/v1/rules - /prometheus/api/v1/alerts + # -- Paths that are exposed by Loki Compactor. + # If deployment mode is Distributed, the requests are forwarded to the service: `{{"loki.compactorFullname"}}`. + # If deployment mode is SimpleScalable, the requests are forwarded to k8s service: `{{"loki.backendFullname"}}`. + # If deployment mode is SingleBinary, the requests are forwarded to the central/single k8s service: `{{"loki.singleBinaryFullname"}}` + compactor: + - /loki/api/v1/delete # -- Hosts configuration for the ingress, passed through the `tpl` function to allow templating hosts: - loki.example.com