123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215 |
- {{- if .Values.collector.enabled -}}
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: {{ template "jaeger.collector.name" . }}
- labels:
- {{- include "jaeger.labels" . | nindent 4 }}
- app.kubernetes.io/component: collector
- {{- if .Values.collector.annotations }}
- annotations:
- {{- toYaml .Values.collector.annotations | nindent 4 }}
- {{- end }}
- spec:
- {{- if not .Values.collector.autoscaling.enabled }}
- replicas: {{ .Values.collector.replicaCount }}
- {{- end }}
- selector:
- matchLabels:
- {{- include "jaeger.selectorLabels" . | nindent 6 }}
- app.kubernetes.io/component: collector
- template:
- metadata:
- annotations:
- checksum/config-env: {{ include (print $.Template.BasePath "/collector-configmap.yaml") . | sha256sum }}
- {{- if .Values.collector.podAnnotations }}
- {{- toYaml .Values.collector.podAnnotations | nindent 8 }}
- {{- end }}
- labels:
- {{- include "jaeger.selectorLabels" . | nindent 8 }}
- app.kubernetes.io/component: collector
- {{- if .Values.collector.podLabels }}
- {{- toYaml .Values.collector.podLabels | nindent 8 }}
- {{- end }}
- spec:
- {{- with .Values.collector.priorityClassName }}
- priorityClassName: {{ . }}
- {{- end }}
- securityContext:
- {{- toYaml .Values.collector.podSecurityContext | nindent 8 }}
- serviceAccountName: {{ template "jaeger.collector.serviceAccountName" . }}
- {{- with .Values.collector.imagePullSecrets }}
- imagePullSecrets:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- if .Values.collector.initContainers }}
- initContainers:
- {{- toYaml .Values.collector.initContainers | nindent 8 }}
- {{- end}}
- containers:
- - name: {{ template "jaeger.collector.name" . }}
- securityContext:
- {{- toYaml .Values.collector.securityContext | nindent 10 }}
- image: {{ .Values.collector.image }}:{{- .Values.collector.tag | default (include "jaeger.image.tag" .) }}
- imagePullPolicy: {{ .Values.collector.pullPolicy }}
- args:
- {{ include "extra.cmdArgs" ( dict "cmdlineParams" .Values.collector.cmdlineParams ) | nindent 10 }}
- {{- if not .Values.ingester.enabled -}}
- {{- include "storage.cmdArgs" . | nindent 10 }}
- {{- end }}
- env:
- {{- if .Values.collector.extraEnv }}
- {{- toYaml .Values.collector.extraEnv | nindent 10 }}
- {{- end }}
- {{- if .Values.collector.service.zipkin }}
- - name: COLLECTOR_ZIPKIN_HOST_PORT
- value: {{ .Values.collector.service.zipkin.port | quote }}
- {{- end }}
- {{- if or .Values.collector.service.otlp.grpc .Values.collector.service.otlp.http }}
- - name: COLLECTOR_OTLP_ENABLED
- value: "true"
- {{- end }}
- {{- if ne (default 4317 .Values.collector.service.otlp.grpc.port | toString ) "4317" }}
- - name: COLLECTOR_OTLP_GRPC_HOST_PORT
- value: {{ .Values.collector.service.otlp.grpc.port | quote }}
- {{- end }}
- {{- if ne (default 4318 .Values.collector.service.otlp.http.port | toString) "4318" }}
- - name: COLLECTOR_OTLP_HTTP_HOST_PORT
- value: {{ .Values.collector.service.otlp.http.port | quote }}
- {{- end }}
- {{- if .Values.ingester.enabled }}
- - name: SPAN_STORAGE_TYPE
- value: kafka
- {{- range $key, $value := .Values.storage.kafka.env }}
- - name: {{ $key | quote }}
- value: {{ $value | quote }}
- {{- end }}
- {{- if .Values.storage.kafka.extraEnv }}
- {{- toYaml .Values.storage.kafka.extraEnv | nindent 10 }}
- {{- end }}
- - name: KAFKA_PRODUCER_BROKERS
- value: {{ tpl (include "helm-toolkit.utils.joinListWithComma" .Values.storage.kafka.brokers) . }}
- - name: KAFKA_PRODUCER_TOPIC
- value: {{ .Values.storage.kafka.topic }}
- - name: KAFKA_PRODUCER_AUTHENTICATION
- value: {{ .Values.storage.kafka.authentication }}
- {{ else }}
- - name: SPAN_STORAGE_TYPE
- value: {{ .Values.storage.type }}
- {{- include "storage.env" . | nindent 10 }}
- {{- end }}
- {{- if .Values.collector.samplingConfig}}
- - name: SAMPLING_STRATEGIES_FILE
- value: /etc/conf/strategies.json
- {{- end }}
- ports:
- - containerPort: {{ .Values.collector.service.grpc.port }}
- name: grpc
- protocol: TCP
- - containerPort: {{ .Values.collector.service.http.port }}
- name: http
- protocol: TCP
- - containerPort: 14269
- name: admin
- protocol: TCP
- {{- if .Values.collector.service.zipkin }}
- - containerPort: {{ .Values.collector.service.zipkin.port }}
- name: zipkin
- protocol: TCP
- {{- end }}
- {{- if or .Values.collector.service.otlp.grpc .Values.collector.service.otlp.http }}
- - containerPort: {{ default 4317 .Values.collector.service.otlp.grpc.port }}
- name: otlp-grpc
- protocol: TCP
- - containerPort: {{ default 4318 .Values.collector.service.otlp.http.port }}
- name: otlp-http
- protocol: TCP
- {{- end }}
- readinessProbe:
- httpGet:
- path: /
- port: admin
- livenessProbe:
- httpGet:
- path: /
- port: admin
- resources:
- {{- toYaml .Values.collector.resources | nindent 10 }}
- volumeMounts:
- {{- range .Values.collector.extraConfigmapMounts }}
- - name: {{ .name }}
- mountPath: {{ .mountPath }}
- subPath: {{ .subPath }}
- readOnly: {{ .readOnly }}
- {{- end }}
- {{- range .Values.collector.extraSecretMounts }}
- - name: {{ .name }}
- mountPath: {{ .mountPath }}
- subPath: {{ .subPath }}
- readOnly: {{ .readOnly }}
- {{- end }}
- {{- if .Values.storage.cassandra.tls.enabled }}
- - name: {{ .Values.storage.cassandra.tls.secretName }}
- mountPath: "/cassandra-tls/ca-cert.pem"
- subPath: "ca-cert.pem"
- readOnly: true
- - name: {{ .Values.storage.cassandra.tls.secretName }}
- mountPath: "/cassandra-tls/client-cert.pem"
- subPath: "client-cert.pem"
- readOnly: true
- - name: {{ .Values.storage.cassandra.tls.secretName }}
- mountPath: "/cassandra-tls/client-key.pem"
- subPath: "client-key.pem"
- readOnly: true
- {{- 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 }}
- {{- if .Values.collector.samplingConfig}}
- - name: strategies
- mountPath: /etc/conf/
- {{- end }}
- dnsPolicy: {{ .Values.collector.dnsPolicy }}
- restartPolicy: Always
- volumes:
- {{- range .Values.collector.extraConfigmapMounts }}
- - name: {{ .name }}
- configMap:
- name: {{ .configMap }}
- {{- end }}
- {{- range .Values.collector.extraSecretMounts }}
- - name: {{ .name }}
- secret:
- secretName: {{ .secretName }}
- {{- end }}
- {{- if .Values.collector.samplingConfig}}
- - name: strategies
- configMap:
- name: {{ include "jaeger.fullname" . }}-sampling-strategies
- {{- end }}
- {{- if .Values.storage.cassandra.tls.enabled }}
- - name: {{ .Values.storage.cassandra.tls.secretName }}
- secret:
- secretName: {{ .Values.storage.cassandra.tls.secretName }}
- {{- end }}
- {{- if .Values.storage.elasticsearch.tls.enabled }}
- - name: {{ .Values.storage.elasticsearch.tls.secretName }}
- secret:
- secretName: {{ .Values.storage.elasticsearch.tls.secretName }}
- {{- end }}
- {{- with .Values.collector.nodeSelector }}
- nodeSelector:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.collector.affinity }}
- affinity:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.collector.tolerations }}
- tolerations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- end -}}
|