Files
2026-08-26 03:39:42 +05:30

141 lines
4.8 KiB
YAML

{{ $dict := dict "ctx" . "component" "compactor" "memberlist" true }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "tempo.resourceName" $dict }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "tempo.labels" $dict | nindent 4 }}
{{- with .Values.compactor.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
minReadySeconds: 10
replicas: {{ .Values.compactor.replicas }}
revisionHistoryLimit: 10
selector:
matchLabels:
{{- include "tempo.selectorLabels" $dict | nindent 6 }}
strategy:
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
template:
metadata:
labels:
{{- include "tempo.podLabels" $dict | nindent 8 }}
{{- with .Values.tempo.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.compactor.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap-tempo.yaml") . | sha256sum }}
{{- with .Values.tempo.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.compactor.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if or (.Values.compactor.priorityClassName) (.Values.global.priorityClassName) }}
priorityClassName: {{ default .Values.compactor.priorityClassName .Values.global.priorityClassName }}
{{- end }}
serviceAccountName: {{ include "tempo.serviceAccountName" . }}
{{- with .Values.tempo.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
enableServiceLinks: false
{{- include "tempo.compactorImagePullSecrets" . | nindent 6 -}}
{{- with .Values.compactor.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- args:
- -target=compactor
- -config.file=/conf/tempo.yaml
- -mem-ballast-size-mbs=1024
{{- with .Values.compactor.extraArgs }}
{{- toYaml . | nindent 12 }}
{{- end }}
image: {{ include "tempo.imageReference" $dict }}
imagePullPolicy: {{ .Values.tempo.image.pullPolicy }}
name: compactor
ports:
- containerPort: 3100
name: http-metrics
- containerPort: {{ include "tempo.memberlistBindPort" . }}
name: http-memberlist
{{- with .Values.compactor.extraEnv }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.compactor.extraEnvFrom }}
envFrom:
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.compactor.resources | nindent 12 }}
{{- with .Values.tempo.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- mountPath: /conf
name: config
- mountPath: /runtime-config
name: runtime-config
- mountPath: /var/tempo
name: tempo-compactor-store
{{- if .Values.enterprise.enabled }}
- name: license
mountPath: /license
{{- end }}
{{- with .Values.compactor.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.compactor.terminationGracePeriodSeconds }}
{{- if semverCompare ">= 1.19-0" .Capabilities.KubeVersion.Version }}
{{- with .Values.compactor.topologySpreadConstraints }}
topologySpreadConstraints:
{{- tpl . $ | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.compactor.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- end }}
{{- with .Values.compactor.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.compactor.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.compactor.dnsConfigOverides.enabled }}
{{- with .Values.compactor.dnsConfigOverides.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
volumes:
- name: config
{{- include "tempo.configVolume" . | nindent 10 }}
- name: runtime-config
{{- include "tempo.runtimeVolume" . | nindent 10 }}
- name: tempo-compactor-store
emptyDir: {}
{{- if .Values.enterprise.enabled }}
- name: license
secret:
secretName: {{ tpl .Values.license.secretName . }}
{{- end }}
{{- with .Values.compactor.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}