162 lines
5.7 KiB
YAML
162 lines
5.7 KiB
YAML
{{- if and (.Values.metricsGenerator.enabled) (eq .Values.metricsGenerator.kind "StatefulSet") }}
|
|
{{ $dict := dict "ctx" . "component" "metrics-generator" "memberlist" true }}
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: {{ include "tempo.resourceName" $dict }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "tempo.labels" $dict | nindent 4 }}
|
|
{{- with .Values.metricsGenerator.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
minReadySeconds: 10
|
|
replicas: {{ .Values.metricsGenerator.replicas }}
|
|
revisionHistoryLimit: 10
|
|
podManagementPolicy: Parallel
|
|
updateStrategy:
|
|
rollingUpdate:
|
|
partition: 0
|
|
selector:
|
|
matchLabels:
|
|
{{- include "tempo.selectorLabels" $dict | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "tempo.podLabels" $dict | nindent 8 }}
|
|
{{- with .Values.tempo.podLabels }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.metricsGenerator.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.metricsGenerator.podAnnotations }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if or (.Values.metricsGenerator.priorityClassName) (.Values.global.priorityClassName) }}
|
|
priorityClassName: {{ default .Values.metricsGenerator.priorityClassName .Values.global.priorityClassName }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "tempo.serviceAccountName" . }}
|
|
{{- with .Values.tempo.podSecurityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
enableServiceLinks: false
|
|
{{- include "tempo.metricsGeneratorImagePullSecrets" . | nindent 6 -}}
|
|
{{- with .Values.metricsGenerator.hostAliases }}
|
|
hostAliases:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
initContainers:
|
|
{{- toYaml .Values.metricsGenerator.initContainers | nindent 8 }}
|
|
containers:
|
|
- args:
|
|
- -target=metrics-generator
|
|
- -config.file=/conf/tempo.yaml
|
|
- -mem-ballast-size-mbs=1024
|
|
{{- with .Values.metricsGenerator.extraArgs }}
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
image: {{ include "tempo.imageReference" $dict }}
|
|
imagePullPolicy: {{ .Values.tempo.image.pullPolicy }}
|
|
name: metrics-generator
|
|
ports:
|
|
{{- range .Values.metricsGenerator.ports }}
|
|
- name: {{ .name | quote }}
|
|
containerPort: {{ .port }}
|
|
{{- end }}
|
|
{{- with .Values.metricsGenerator.extraEnv }}
|
|
env:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.metricsGenerator.extraEnvFrom }}
|
|
envFrom:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
readinessProbe:
|
|
{{- toYaml .Values.tempo.readinessProbe | nindent 12 }}
|
|
resources:
|
|
{{- toYaml .Values.metricsGenerator.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: wal
|
|
{{- if .Values.enterprise.enabled }}
|
|
- name: license
|
|
mountPath: /license
|
|
{{- end }}
|
|
{{- with .Values.metricsGenerator.extraVolumeMounts }}
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
terminationGracePeriodSeconds: {{ .Values.metricsGenerator.terminationGracePeriodSeconds }}
|
|
{{- if semverCompare ">= 1.19-0" .Capabilities.KubeVersion.Version }}
|
|
{{- with .Values.metricsGenerator.topologySpreadConstraints }}
|
|
topologySpreadConstraints:
|
|
{{- tpl . $ | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- with .Values.metricsGenerator.affinity }}
|
|
affinity:
|
|
{{- tpl . $ | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.metricsGenerator.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.metricsGenerator.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.metricsGenerator.extraVolumes }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if not .Values.metricsGenerator.persistence.enabled }}
|
|
- name: wal
|
|
emptyDir: {{- toYaml .Values.metricsGenerator.walEmptyDir | nindent 12 }}
|
|
{{- else }}
|
|
volumeClaimTemplates:
|
|
- apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
{{- with .Values.metricsGenerator.persistence.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
name: wal
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
{{- with .Values.metricsGenerator.persistence.storageClass }}
|
|
storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }}
|
|
{{- end }}
|
|
resources:
|
|
requests:
|
|
storage: {{ .Values.metricsGenerator.persistence.size | quote }}
|
|
{{- end }}
|
|
{{- end }}
|