From 1466c2a5f3f30dc816aee001efa91096174e9690 Mon Sep 17 00:00:00 2001 From: Andy Lo-A-Foe Date: Fri, 1 Nov 2024 11:20:22 +0100 Subject: [PATCH] Support initContainers and extraContainers for compactor We have a use case where we need to run an init container and extra container as part of the compactor pod. Signed-off-by: Andy Lo-A-Foe --- charts/tempo-distributed/Chart.yaml | 2 +- charts/tempo-distributed/README.md | 4 +++- .../templates/compactor/deployment-compactor.yaml | 5 +++++ charts/tempo-distributed/values.yaml | 4 ++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/charts/tempo-distributed/Chart.yaml b/charts/tempo-distributed/Chart.yaml index 0fd3101b7c..18c2188f09 100644 --- a/charts/tempo-distributed/Chart.yaml +++ b/charts/tempo-distributed/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: tempo-distributed description: Grafana Tempo in MicroService mode type: application -version: 1.20.0 +version: 1.20.1 appVersion: 2.6.0 engine: gotpl home: https://grafana.com/docs/tempo/latest/ diff --git a/charts/tempo-distributed/README.md b/charts/tempo-distributed/README.md index 659b29c864..4241600464 100755 --- a/charts/tempo-distributed/README.md +++ b/charts/tempo-distributed/README.md @@ -1,6 +1,6 @@ # tempo-distributed -![Version: 1.20.0](https://img.shields.io/badge/Version-1.20.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.0](https://img.shields.io/badge/AppVersion-2.6.0-informational?style=flat-square) +![Version: 1.20.1](https://img.shields.io/badge/Version-1.20.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.0](https://img.shields.io/badge/AppVersion-2.6.0-informational?style=flat-square) Grafana Tempo in MicroService mode @@ -291,6 +291,7 @@ The memcached default args are removed and should be provided manually. The sett | compactor.dnsConfigOverides.dnsConfig.options[0].value | string | `"3"` | | | compactor.dnsConfigOverides.enabled | bool | `false` | | | compactor.extraArgs | list | `[]` | Additional CLI args for the compactor | +| compactor.extraContainers | list | `[]` | Containers to add to the compactor pod | | compactor.extraEnv | list | `[]` | Environment variables to add to the compactor pods | | compactor.extraEnvFrom | list | `[]` | Environment variables from secrets or configmaps to add to the compactor pods | | compactor.extraVolumeMounts | list | `[]` | Extra volumes for compactor pods | @@ -300,6 +301,7 @@ The memcached default args are removed and should be provided manually. The sett | compactor.image.registry | string | `nil` | The Docker registry for the compactor image. Overrides `tempo.image.registry` | | compactor.image.repository | string | `nil` | Docker image repository for the compactor image. Overrides `tempo.image.repository` | | compactor.image.tag | string | `nil` | Docker image tag for the compactor image. Overrides `tempo.image.tag` | +| compactor.initContainers | list | `[]` | Init containers to add to the compactor pod | | compactor.maxUnavailable | int | `1` | Pod Disruption Budget maxUnavailable | | compactor.nodeSelector | object | `{}` | Node selector for compactor pods | | compactor.podAnnotations | object | `{}` | Annotations for compactor pods | diff --git a/charts/tempo-distributed/templates/compactor/deployment-compactor.yaml b/charts/tempo-distributed/templates/compactor/deployment-compactor.yaml index 37f5342204..bbc1da74c6 100644 --- a/charts/tempo-distributed/templates/compactor/deployment-compactor.yaml +++ b/charts/tempo-distributed/templates/compactor/deployment-compactor.yaml @@ -54,6 +54,8 @@ spec: hostAliases: {{- toYaml . | nindent 8 }} {{- end }} + initContainers: + {{- toYaml .Values.ingester.initContainers | nindent 8 }} containers: - args: - -target=compactor @@ -103,6 +105,9 @@ spec: {{- with .Values.compactor.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} + {{- with .Values.compactor.extraContainers }} + {{- toYaml . | nindent 8 }} + {{- end }} terminationGracePeriodSeconds: {{ .Values.compactor.terminationGracePeriodSeconds }} {{- if semverCompare ">= 1.19-0" .Capabilities.KubeVersion.Version }} {{- with .Values.compactor.topologySpreadConstraints }} diff --git a/charts/tempo-distributed/values.yaml b/charts/tempo-distributed/values.yaml index b721222e80..20a117500f 100755 --- a/charts/tempo-distributed/values.yaml +++ b/charts/tempo-distributed/values.yaml @@ -612,6 +612,10 @@ compactor: extraEnv: [] # -- Environment variables from secrets or configmaps to add to the compactor pods extraEnvFrom: [] + # -- Init containers to add to the compactor pod + initContainers: [] + # -- Containers to add to the compactor pod + extraContainers: [] # -- Resource requests and limits for the compactor resources: {} # -- Grace period to allow the compactor to shutdown before it is killed