123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- {{- if .Values.esLookback.enabled -}}
- apiVersion: {{ include "common.capabilities.cronjob.apiVersion" $ }}
- kind: CronJob
- metadata:
- name: {{ include "jaeger.fullname" . }}-es-lookback
- labels:
- {{- include "jaeger.labels" . | nindent 4 }}
- app.kubernetes.io/component: es-lookback
- {{- if .Values.esLookback.annotations }}
- annotations:
- {{- toYaml .Values.esLookback.annotations | nindent 4 }}
- {{- end }}
- spec:
- concurrencyPolicy: {{ .Values.esLookback.concurrencyPolicy }}
- schedule: {{ .Values.esLookback.schedule | quote }}
- successfulJobsHistoryLimit: {{ .Values.esLookback.successfulJobsHistoryLimit }}
- failedJobsHistoryLimit: {{ .Values.esLookback.failedJobsHistoryLimit }}
- suspend: false
- jobTemplate:
- spec:
- {{- if .Values.esLookback.activeDeadlineSeconds }}
- activeDeadlineSeconds: {{ .Values.esLookback.activeDeadlineSeconds }}
- {{- end }}
- {{- if .Values.esLookback.ttlSecondsAfterFinished }}
- ttlSecondsAfterFinished: {{ .Values.esLookback.ttlSecondsAfterFinished }}
- {{- end }}
- template:
- metadata:
- {{- if .Values.esLookback.podAnnotations }}
- annotations:
- {{- toYaml .Values.esLookback.podAnnotations | nindent 12 }}
- {{- end }}
- labels:
- {{- include "jaeger.selectorLabels" . | nindent 12 }}
- app.kubernetes.io/component: es-lookback
- {{- if .Values.esLookback.podLabels }}
- {{- toYaml .Values.esLookback.podLabels | nindent 12 }}
- {{- end }}
- spec:
- serviceAccountName: {{ template "jaeger.esLookback.serviceAccountName" . }}
- {{- with .Values.esLookback.imagePullSecrets }}
- imagePullSecrets:
- {{- toYaml . | nindent 12 }}
- {{- end }}
- securityContext:
- {{- toYaml .Values.esLookback.podSecurityContext | nindent 12 }}
- restartPolicy: OnFailure
- {{- with .Values.esLookback.nodeSelector }}
- nodeSelector:
- {{- toYaml . | nindent 12 }}
- {{- end }}
- {{- with .Values.esLookback.affinity }}
- affinity:
- {{- toYaml . | nindent 12 }}
- {{- end }}
- {{- with .Values.esLookback.tolerations }}
- tolerations:
- {{- toYaml . | nindent 12 }}
- {{- end }}
- containers:
- - name: {{ include "jaeger.fullname" . }}-es-lookback
- securityContext:
- {{- toYaml .Values.esLookback.securityContext | nindent 14 }}
- image: "{{ .Values.esLookback.image }}:{{- include "jaeger.image.tag" . }}"
- imagePullPolicy: {{ .Values.esLookback.pullPolicy }}
- args:
- - lookback
- - {{ include "elasticsearch.client.url" . }}
- {{ include "extra.cmdArgs" ( dict "cmdlineParams" .Values.esLookback.cmdlineParams ) | nindent 14 }}
- env:
- {{ include "elasticsearch.env" . | nindent 14 }}
- {{- if .Values.esLookback.extraEnv }}
- {{- toYaml .Values.esLookback.extraEnv | nindent 14 }}
- {{- end }}
- resources:
- {{- toYaml .Values.esLookback.resources | nindent 14 }}
- volumeMounts:
- {{- range .Values.esLookback.extraConfigmapMounts }}
- - name: {{ .name }}
- mountPath: {{ .mountPath }}
- subPath: {{ .subPath }}
- readOnly: {{ .readOnly }}
- {{- end }}
- {{- range .Values.esLookback.extraSecretMounts }}
- - name: {{ .name }}
- mountPath: {{ .mountPath }}
- subPath: {{ .subPath }}
- readOnly: {{ .readOnly }}
- {{- end }}
- {{- if .Values.storage.elasticsearch.tls.enabled }}
- - name: {{ .Values.storage.elasticsearch.tls.secretName }}
- mountPath: "/es-tls/ca-cert.pem"
- subPath: "ca-cert.pem"
- readOnly: true
- {{- end }}
- volumes:
- {{- range .Values.esLookback.extraConfigmapMounts }}
- - name: {{ .name }}
- configMap:
- name: {{ .configMap }}
- {{- end }}
- {{- range .Values.esLookback.extraSecretMounts }}
- - name: {{ .name }}
- secret:
- secretName: {{ .secretName }}
- {{- end }}
- {{- if .Values.storage.elasticsearch.tls.enabled }}
- - name: {{ .Values.storage.elasticsearch.tls.secretName }}
- secret:
- secretName: {{ .Values.storage.elasticsearch.tls.secretName }}
- {{- end }}
- {{- end -}}
|