Skip to content

Commit

Permalink
Support initContainers and extraContainers for compactor
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
loafoe committed Nov 1, 2024
1 parent 1102acd commit 1466c2a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/tempo-distributed/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
4 changes: 3 additions & 1 deletion charts/tempo-distributed/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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 |
Expand All @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ spec:
hostAliases:
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
{{- toYaml .Values.ingester.initContainers | nindent 8 }}
containers:
- args:
- -target=compactor
Expand Down Expand Up @@ -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 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/tempo-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1466c2a

Please sign in to comment.