From aa0ecd653e148d97a0dd2e75792d28caaf31d444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Lindh=C3=A9?= <7773090+lindhe@users.noreply.github.com> Date: Thu, 12 Dec 2024 11:29:25 +0100 Subject: [PATCH 1/2] feat(helm): Add startupProbe to compactor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a configurable `startupProbe` to the compactor container in the compactor pods. Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> --- production/helm/loki/CHANGELOG.md | 1 + .../loki/templates/compactor/_helpers-compactor.tpl | 10 ++++++++++ .../templates/compactor/statefulset-compactor.yaml | 1 + production/helm/loki/values.yaml | 2 ++ 4 files changed, 14 insertions(+) diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index 29c2da475df1f..97a366e246464 100644 --- a/production/helm/loki/CHANGELOG.md +++ b/production/helm/loki/CHANGELOG.md @@ -20,6 +20,7 @@ Entries should include a reference to the pull request that introduced the chang - [ENHANCEMENT] Add support for configuring `volumeAttributesClassName` for `volumeClaimTemplates`. [#19719](https://github.com/grafana/loki/pull/19719) - [BUGFIX] Don't fail for missing bucket name, if minio is enabled. [#19745](https://github.com/grafana/loki/pull/19745) - [BUGFIX] Add startupProbe to read pod [#19708](https://github.com/grafana/loki/pull/19708) +- [ENHANCEMENT] Add configurable `startupProbe` to compactor [#20072](https://github.com/grafana/loki/pull/20072). ## 6.46.0 diff --git a/production/helm/loki/templates/compactor/_helpers-compactor.tpl b/production/helm/loki/templates/compactor/_helpers-compactor.tpl index 061dfc874d657..9570eca0272c1 100644 --- a/production/helm/loki/templates/compactor/_helpers-compactor.tpl +++ b/production/helm/loki/templates/compactor/_helpers-compactor.tpl @@ -49,6 +49,16 @@ livenessProbe: {{- end }} {{- end }} +{{/* +compactor startup probe +*/}} +{{- define "loki.compactor.startupProbe" }} +{{- with .Values.compactor.startupProbe | default .Values.loki.startupProbe }} +startupProbe: + {{- toYaml . | nindent 2 }} +{{- end }} +{{- end }} + {{/* compactor priority class name */}} diff --git a/production/helm/loki/templates/compactor/statefulset-compactor.yaml b/production/helm/loki/templates/compactor/statefulset-compactor.yaml index 98a725124cbf5..256fb8840eac0 100644 --- a/production/helm/loki/templates/compactor/statefulset-compactor.yaml +++ b/production/helm/loki/templates/compactor/statefulset-compactor.yaml @@ -111,6 +111,7 @@ spec: {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} {{- include "loki.compactor.readinessProbe" . | nindent 10 }} {{- include "loki.compactor.livenessProbe" . | nindent 10 }} + {{- include "loki.compactor.startupProbe" . | nindent 10 }} volumeMounts: - name: temp mountPath: /tmp diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index f231e41d7aec8..95a270ddb9e0e 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -2775,6 +2775,8 @@ compactor: readinessProbe: {} # -- liveness probe settings for ingester pods. If empty use `loki.livenessProbe` livenessProbe: {} + # -- liveness probe settings for ingester pods. If empty use `loki.livenessProbe` + startupProbe: {} # -- Resource requests and limits for the compactor resources: {} # -- Containers to add to the compactor pods From 7944d3bba6480a7f89c6daa3a4504116e19d02c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Lindh=C3=A9?= <7773090+lindhe@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:26:47 +0100 Subject: [PATCH 2/2] chore(helm): Update reference.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Done via the following command: ``` docker run -it --rm -v "$(pwd):/go" --entrypoint bash -e BUILD_IN_CONTAINER=false grafana/loki-build-image:0.34.7.1 -c 'git config --global --add safe.directory /go; make -BC docs sources/setup/install/helm/reference.md' ``` Signed-off-by: Andreas Lindhé <7773090+lindhe@users.noreply.github.com> --- docs/sources/setup/install/helm/reference.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/sources/setup/install/helm/reference.md b/docs/sources/setup/install/helm/reference.md index 3acdd12d4d2a1..f1d727e4ba73e 100644 --- a/docs/sources/setup/install/helm/reference.md +++ b/docs/sources/setup/install/helm/reference.md @@ -3117,6 +3117,7 @@ null "serviceAnnotations": {}, "serviceLabels": {}, "serviceType": "ClusterIP", + "startupProbe": {}, "terminationGracePeriodSeconds": 30, "tolerations": [] } @@ -3467,6 +3468,15 @@ null
"ClusterIP"
+
+{}
+