From 39abc48c8bf4a3bb7d486e0e1c1bb2c423b03378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Robles=20Mart=C3=ADn?= Date: Tue, 29 Jul 2025 17:43:56 +0400 Subject: [PATCH] [loki-distributed] Add index-gateway container lifecycle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Francisco Robles Martín --- charts/loki-distributed/Chart.yaml | 2 +- charts/loki-distributed/README.md | 3 ++- .../templates/index-gateway/statefulset-index-gateway.yaml | 4 ++++ charts/loki-distributed/values.yaml | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/charts/loki-distributed/Chart.yaml b/charts/loki-distributed/Chart.yaml index 2ccb1c4ee9..b0d97d320d 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.13 -version: 0.80.5 +version: 0.80.6 home: https://grafana.github.io/helm-charts sources: - https://github.com/grafana/loki diff --git a/charts/loki-distributed/README.md b/charts/loki-distributed/README.md index 6693b86cf4..7594751f28 100644 --- a/charts/loki-distributed/README.md +++ b/charts/loki-distributed/README.md @@ -1,6 +1,6 @@ # loki-distributed -![Version: 0.80.5](https://img.shields.io/badge/Version-0.80.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.13](https://img.shields.io/badge/AppVersion-2.9.13-informational?style=flat-square) +![Version: 0.80.6](https://img.shields.io/badge/Version-0.80.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.13](https://img.shields.io/badge/AppVersion-2.9.13-informational?style=flat-square) Helm chart for Grafana Loki in microservices mode @@ -262,6 +262,7 @@ kubectl delete statefulset RELEASE_NAME-loki-distributed-querier -n LOKI_NAMESPA | indexGateway.image.tag | string | `nil` | Docker image tag for the index-gateway image. Overrides `loki.image.tag` | | indexGateway.initContainers | list | `[]` | Init containers to add to the index-gateway pods | | indexGateway.joinMemberlist | bool | `true` | Whether the index gateway should join the memberlist hashring | +| indexGateway.lifecycle | object | `{}` | Lifecycle for the index-gateway container | | indexGateway.maxUnavailable | string | `nil` | Pod Disruption Budget maxUnavailable | | indexGateway.minAvailable | string | `nil` | Pod Disruption Budget minAvailable | | indexGateway.nodeSelector | object | `{}` | Node selector for index-gateway pods | diff --git a/charts/loki-distributed/templates/index-gateway/statefulset-index-gateway.yaml b/charts/loki-distributed/templates/index-gateway/statefulset-index-gateway.yaml index b91a2910ef..b8cd409291 100644 --- a/charts/loki-distributed/templates/index-gateway/statefulset-index-gateway.yaml +++ b/charts/loki-distributed/templates/index-gateway/statefulset-index-gateway.yaml @@ -115,6 +115,10 @@ spec: {{- end }} resources: {{- toYaml .Values.indexGateway.resources | nindent 12 }} + {{- with .Values.indexGateway.lifecycle }} + lifecycle: + {{- toYaml . | nindent 12 }} + {{- end }} {{- if .Values.indexGateway.extraContainers }} {{- toYaml .Values.indexGateway.extraContainers | nindent 8}} {{- end }} diff --git a/charts/loki-distributed/values.yaml b/charts/loki-distributed/values.yaml index eb73c22c0e..b0b3818561 100644 --- a/charts/loki-distributed/values.yaml +++ b/charts/loki-distributed/values.yaml @@ -1676,6 +1676,8 @@ indexGateway: initContainers: [] # -- Grace period to allow the index-gateway to shutdown before it is killed. terminationGracePeriodSeconds: 300 + # -- Lifecycle for the index-gateway container + lifecycle: {} # -- Affinity for index-gateway pods. Passed through `tpl` and, thus, to be configured as string # @default -- Hard node and soft zone anti-affinity affinity: |