123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298 |
- {{- if .Values.query.enabled -}}
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: {{ template "jaeger.query.name" . }}
- labels:
- {{- include "jaeger.labels" . | nindent 4 }}
- app.kubernetes.io/component: query
- {{- if .Values.query.annotations }}
- annotations:
- {{- toYaml .Values.query.annotations | nindent 4 }}
- {{- end }}
- spec:
- replicas: {{ .Values.query.replicaCount }}
- selector:
- matchLabels:
- {{- include "jaeger.selectorLabels" . | nindent 6 }}
- app.kubernetes.io/component: query
- template:
- metadata:
- {{- if or .Values.query.config .Values.query.podAnnotations }}
- annotations:
- {{- if .Values.query.config }}
- checksum/ui-config: {{ include (print $.Template.BasePath "/query-configmap.yaml") . | sha256sum }}
- {{- end }}
- {{- if .Values.query.podAnnotations }}
- {{- toYaml .Values.query.podAnnotations | nindent 8 }}
- {{- end }}
- {{- end }}
- labels:
- {{- include "jaeger.selectorLabels" . | nindent 8 }}
- app.kubernetes.io/component: query
- {{- if .Values.query.podLabels }}
- {{- toYaml .Values.query.podLabels | nindent 8 }}
- {{- end }}
- spec:
- {{- with .Values.query.priorityClassName }}
- priorityClassName: {{ . }}
- {{- end }}
- securityContext:
- {{- toYaml .Values.query.podSecurityContext | nindent 8 }}
- serviceAccountName: {{ template "jaeger.query.serviceAccountName" . }}
- {{- with .Values.query.imagePullSecrets }}
- imagePullSecrets:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- containers:
- - name: {{ template "jaeger.query.name" . }}
- securityContext:
- {{- toYaml .Values.query.securityContext | nindent 10 }}
- image: {{ .Values.query.image }}:{{- .Values.query.tag | default (include "jaeger.image.tag" .) }}
- imagePullPolicy: {{ .Values.query.pullPolicy }}
- args:
- {{ include "extra.cmdArgs" ( dict "cmdlineParams" .Values.query.cmdlineParams ) | nindent 10 }}
- {{- include "storage.cmdArgs" . | nindent 10 }}
- env:
- {{- if .Values.query.extraEnv }}
- {{- toYaml .Values.query.extraEnv | nindent 10 }}
- {{- end }}
- - name: SPAN_STORAGE_TYPE
- value: {{ .Values.storage.type }}
- {{- include "storage.env" . | nindent 10 }}
- {{- if .Values.query.basePath }}
- - name: QUERY_BASE_PATH
- value: {{ .Values.query.basePath | quote }}
- {{- end }}
- - name: JAEGER_AGENT_PORT
- value: "6831"
- {{- if .Values.query.config}}
- - name: QUERY_UI_CONFIG
- value: /etc/conf/query-ui-config.json
- {{- end }}
- {{- with .Values.query.envFrom }}
- envFrom: {{- toYaml . | nindent 10 }}
- {{- end }}
- ports:
- - name: query
- containerPort: 16686
- protocol: TCP
- - name: grpc
- containerPort: 16685
- protocol: TCP
- - name: admin
- containerPort: 16687
- protocol: TCP
- resources:
- {{- toYaml .Values.query.resources | nindent 10 }}
- volumeMounts:
- {{- range .Values.query.extraSecretMounts }}
- - name: {{ .name }}
- mountPath: {{ .mountPath }}
- subPath: {{ .subPath }}
- readOnly: {{ .readOnly }}
- {{- end }}
- {{- range .Values.query.extraConfigmapMounts }}
- - 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: {{ .Values.storage.elasticsearch.tls.mountPath }}
- subPath: {{ .Values.storage.elasticsearch.tls.subPath }}
- readOnly: true
- {{- end }}
- {{- if .Values.query.config}}
- - name: ui-configuration
- mountPath: /etc/conf/
- {{- end }}
- livenessProbe:
- httpGet:
- path: /
- port: admin
- readinessProbe:
- httpGet:
- path: /
- port: admin
- {{- if .Values.query.oAuthSidecar.enabled }}
- - name: {{ template "jaeger.agent.name" . }}-oauth2-sidecar
- image: {{ .Values.query.oAuthSidecar.image }}
- imagePullPolicy: {{ .Values.query.oAuthSidecar.pullPolicy }}
- args:
- {{- range .Values.query.oAuthSidecar.args }}
- - {{ . }}
- {{- end }}
- {{- if .Values.query.oAuthSidecar.extraEnv }}
- env:
- {{- toYaml .Values.query.oAuthSidecar.extraEnv | nindent 10 }}
- {{- end }}
- volumeMounts:
- {{- range .Values.query.oAuthSidecar.extraConfigmapMounts }}
- - name: {{ .name }}
- mountPath: {{ .mountPath }}
- subPath: {{ .subPath }}
- readOnly: {{ .readOnly }}
- {{- end }}
- {{- range .Values.query.oAuthSidecar.extraSecretMounts }}
- - name: {{ .name }}
- mountPath: {{ .mountPath }}
- subPath: {{ .subPath }}
- readOnly: {{ .readOnly }}
- {{- end }}
- {{- if .Values.query.oAuthSidecar.config}}
- - name: jaeger-oauth-configuration
- mountPath: /etc/oauth2-proxy
- {{- end }}
- ports:
- - containerPort: {{ .Values.query.oAuthSidecar.containerPort }}
- name: oauth-proxy
- resources:
- {{- toYaml .Values.query.oAuthSidecar.resources | nindent 10 }}
- {{- if .Values.query.oAuthSidecar.livenessProbe }}
- livenessProbe:
- {{- toYaml .Values.query.oAuthSidecar.livenessProbe | nindent 10 }}
- {{- end }}
- {{- if .Values.query.oAuthSidecar.readinessProbe }}
- readinessProbe:
- {{- toYaml .Values.query.oAuthSidecar.readinessProbe | nindent 10 }}
- {{- end }}
- {{- end }}
- {{- if .Values.query.agentSidecar.enabled }}
- - name: {{ template "jaeger.agent.name" . }}-sidecar
- securityContext:
- {{- toYaml .Values.query.securityContext | nindent 10 }}
- image: {{ .Values.agent.image }}:{{- include "jaeger.image.tag" . }}
- imagePullPolicy: {{ .Values.agent.pullPolicy }}
- args:
- {{- range $key, $value := .Values.agent.cmdlineParams }}
- {{- if $value }}
- - --{{ $key }}={{ $value }}
- {{- else }}
- - --{{ $key }}
- {{- end }}
- {{- end }}
- env:
- {{- if not (hasKey .Values.agent.cmdlineParams "reporter.grpc.host-port") }}
- - name: REPORTER_GRPC_HOST_PORT
- value: {{ include "jaeger.collector.name" . }}:{{ .Values.collector.service.grpc.port }}
- {{- end }}
- ports:
- - name: admin
- containerPort: 14271
- protocol: TCP
- resources:
- {{- toYaml .Values.query.agentSidecar.resources | nindent 10 }}
- volumeMounts:
- {{- range .Values.agent.extraConfigmapMounts }}
- - name: {{ .name }}
- mountPath: {{ .mountPath }}
- subPath: {{ .subPath }}
- readOnly: {{ .readOnly }}
- {{- end }}
- {{- range .Values.agent.extraSecretMounts }}
- - name: {{ .name }}
- mountPath: {{ .mountPath }}
- subPath: {{ .subPath }}
- readOnly: {{ .readOnly }}
- {{- end }}
- livenessProbe:
- httpGet:
- path: /
- port: admin
- readinessProbe:
- httpGet:
- path: /
- port: admin
- {{- end }}
- {{- if .Values.query.sidecars }}
- {{- tpl (toYaml .Values.query.sidecars) . | nindent 6 }}
- {{- end }}
- dnsPolicy: {{ .Values.query.dnsPolicy }}
- restartPolicy: Always
- volumes:
- {{- range .Values.query.extraConfigmapMounts }}
- - name: {{ .name }}
- configMap:
- name: {{ .configMap }}
- {{- end }}
- {{- range .Values.query.extraSecretMounts }}
- - name: {{ .name }}
- secret:
- secretName: {{ .secretName }}
- {{- end }}
- {{- if .Values.query.config}}
- - name: ui-configuration
- configMap:
- name: {{ include "jaeger.fullname" . }}-ui-configuration
- {{- 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 }}
- {{- if .Values.query.oAuthSidecar.enabled }}
- {{- range .Values.query.oAuthSidecar.extraConfigmapMounts }}
- - name: {{ .name }}
- configMap:
- name: {{ .configMap }}
- {{- end }}
- {{- range .Values.query.oAuthSidecar.extraSecretMounts }}
- - name: {{ .name }}
- secret:
- secretName: {{ .secretName }}
- {{- end }}
- {{- if .Values.query.oAuthSidecar.config }}
- - name: jaeger-oauth-configuration
- configMap:
- name: {{ include "jaeger.fullname" . }}-oauth-configuration
- {{- end }}
- {{- end }}
- {{- if .Values.query.agentSidecar.enabled }}
- {{- range .Values.agent.extraSecretMounts }}
- - name: {{ .name }}
- secret:
- secretName: {{ .secretName }}
- {{- end }}
- {{- range .Values.agent.extraConfigmapMounts }}
- - name: {{ .name }}
- configMap:
- name: {{ .configMap }}
- {{- end }}
- {{- end }}
- {{- if .Values.query.extraVolumes }}
- {{- tpl (toYaml .Values.query.extraVolumes) . | nindent 8 }}
- {{- end }}
- {{- with .Values.query.nodeSelector }}
- nodeSelector:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.query.affinity }}
- affinity:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.query.tolerations }}
- tolerations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- end -}}
|