196 lines
6.5 KiB
YAML
196 lines
6.5 KiB
YAML
{{- $dict := dict "ctx" . "component" "ingester" "memberlist" true -}}
|
|
{{- $zonesMap := include "ingester.zoneAwareReplicationMap" $dict | fromYaml -}}
|
|
{{- range $zoneName, $rolloutZone := $zonesMap -}}
|
|
{{- with $ -}}
|
|
{{- $_ := set $dict "rolloutZoneName" $zoneName -}}
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: {{ template "ingester.resourceName" $dict }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "ingester.labels" $dict | indent 4 }}
|
|
{{- if .Values.ingester.zoneAwareReplication.enabled }}
|
|
annotations:
|
|
{{- include "ingester.Annotations" $dict | nindent 4}}
|
|
{{- else }}
|
|
{{- with .Values.ingester.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if not .Values.ingester.autoscaling.enabled }}
|
|
replicas: {{ $rolloutZone.replicas }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "ingester.selectorLabels" $dict | nindent 6}}
|
|
serviceName: ingester
|
|
podManagementPolicy: Parallel
|
|
updateStrategy:
|
|
{{- if .Values.ingester.zoneAwareReplication.enabled }}
|
|
type: OnDelete
|
|
{{- else }}
|
|
rollingUpdate:
|
|
partition: 0
|
|
{{- end }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "ingester.podLabels" $dict | nindent 8 }}
|
|
{{- with .Values.tempo.podLabels }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.ingester.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.ingester.podAnnotations }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if or (.Values.ingester.priorityClassName) (.Values.global.priorityClassName) }}
|
|
priorityClassName: {{ default .Values.ingester.priorityClassName .Values.global.priorityClassName }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "tempo.serviceAccountName" . }}
|
|
{{- with .Values.tempo.podSecurityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
enableServiceLinks: false
|
|
{{- include "tempo.ingesterImagePullSecrets" . | nindent 6 -}}
|
|
{{- with .Values.ingester.hostAliases }}
|
|
hostAliases:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
initContainers:
|
|
{{- toYaml .Values.ingester.initContainers | nindent 8 }}
|
|
containers:
|
|
- args:
|
|
- -target=ingester
|
|
- -config.file=/conf/tempo.yaml
|
|
- -mem-ballast-size-mbs=1024
|
|
{{- with .Values.ingester.extraArgs }}
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
image: {{ include "tempo.imageReference" $dict }}
|
|
imagePullPolicy: {{ .Values.tempo.image.pullPolicy }}
|
|
name: ingester
|
|
ports:
|
|
- name: grpc
|
|
containerPort: 9095
|
|
- name: http-memberlist
|
|
containerPort: {{ include "tempo.memberlistBindPort" . }}
|
|
- name: http-metrics
|
|
containerPort: 3100
|
|
{{- with .Values.ingester.extraEnv }}
|
|
env:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.ingester.extraEnvFrom }}
|
|
envFrom:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
readinessProbe:
|
|
{{- toYaml .Values.tempo.readinessProbe | nindent 12 }}
|
|
resources:
|
|
{{- toYaml .Values.ingester.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: data
|
|
{{- if .Values.enterprise.enabled }}
|
|
- name: license
|
|
mountPath: /license
|
|
{{- end }}
|
|
{{- with .Values.ingester.extraVolumeMounts }}
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
terminationGracePeriodSeconds: {{ .Values.ingester.terminationGracePeriodSeconds }}
|
|
{{- if semverCompare ">= 1.19-0" .Capabilities.KubeVersion.Version }}
|
|
{{- with .Values.ingester.topologySpreadConstraints }}
|
|
topologySpreadConstraints:
|
|
{{- tpl . $ | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if eq $zoneName ""}}
|
|
{{- with $rolloutZone.affinity }}
|
|
affinity:
|
|
{{- tpl . $ | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if ne $zoneName "" }}
|
|
{{- with $rolloutZone.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- with $rolloutZone.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.ingester.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: config
|
|
{{- include "tempo.configVolume" . | nindent 10 }}
|
|
- name: runtime-config
|
|
{{- include "tempo.runtimeVolume" . | nindent 10 }}
|
|
{{- if .Values.enterprise.enabled }}
|
|
- name: license
|
|
secret:
|
|
secretName: {{ tpl .Values.license.secretName . }}
|
|
{{- end }}
|
|
{{- with .Values.ingester.extraVolumes }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if not .Values.ingester.persistence.enabled }}
|
|
- name: data
|
|
emptyDir: {}
|
|
{{- else if .Values.ingester.persistence.inMemory }}
|
|
- name: data
|
|
{{- if .Values.ingester.persistence.inMemory }}
|
|
emptyDir:
|
|
medium: Memory
|
|
{{- end }}
|
|
{{- if .Values.ingester.persistence.size }}
|
|
sizeLimit: {{ .Values.ingester.persistence.size }}
|
|
{{- end }}
|
|
{{- else }}
|
|
volumeClaimTemplates:
|
|
- apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
{{- with .Values.ingester.persistence.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
name: data
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
{{- with .Values.ingester.persistence.storageClass }}
|
|
storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }}
|
|
{{- end }}
|
|
resources:
|
|
requests:
|
|
storage: {{ .Values.ingester.persistence.size | quote }}
|
|
{{- end }}
|
|
---
|
|
{{ end }}
|
|
{{ end }}
|