apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "trino.coordinator" . }} labels: app: {{ template "trino.name" . }} chart: {{ template "trino.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} component: coordinator spec: selector: matchLabels: app: {{ template "trino.name" . }} release: {{ .Release.Name }} component: coordinator template: metadata: labels: app: {{ template "trino.name" . }} release: {{ .Release.Name }} component: coordinator spec: serviceAccountName: {{ include "trino.serviceAccountName" . }} {{- with .Values.securityContext }} securityContext: runAsUser: {{ .runAsUser }} runAsGroup: {{ .runAsGroup }} {{- end }} volumes: - name: config-volume configMap: name: {{ template "trino.coordinator" . }} - name: catalog-volume configMap: name: {{ template "trino.catalog" . }} - name: schemas-volume configMap: name: schemas-volume-coordinator {{- if .Values.accessControl }}{{- if eq .Values.accessControl.type "configmap" }} - name: access-control-volume configMap: name: {{- end }}{{- end }} {{- if eq .Values.server.config.authenticationType "PASSWORD" }} - name: secret: secretName: {{- end }} {{- if eq .Values.prometheus.enabled "true" }} - name: telemetry-volume emptyDir: {} {{- end }} {{- if eq .Values.prometheus.enabled "true" }} initContainers: - name: copy image: busybox:1.28 command: ["/bin/sh", "-c", "wget -q -O /etc/trino/telemetry/jmx_prometheus_javaagent-0.17.0.jar && chmod +x /etc/trino/telemetry/jmx_prometheus_javaagent-0.17.0.jar"] volumeMounts: - name: telemetry-volume mountPath: /etc/trino/telemetry/ {{- end }} {{- if .Values.initContainers.coordinator }} initContainers: {{- tpl (toYaml .Values.initContainers.coordinator) . | nindent 6 }} {{- end }} {{- range .Values.secretMounts }} - name: {{ .name }} secret: secretName: {{ .secretName }} {{- end }} imagePullSecrets: {{- toYaml .Values.imagePullSecrets | nindent 8 }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} containers: - name: {{ .Chart.Name }}-coordinator image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: {{- toYaml .Values.env | nindent 12 }} volumeMounts: - mountPath: {{ .Values.server.config.path }} name: config-volume - mountPath: {{ .Values.server.config.path }}/catalog name: catalog-volume - mountPath: {{ .Values.kafka.mountPath }} name: schemas-volume {{- if .Values.accessControl }}{{- if eq .Values.accessControl.type "configmap" }} - mountPath: {{ .Values.server.config.path }}/access-control name: access-control-volume {{- end }}{{- end }} {{- range .Values.secretMounts }} - name: {{ .name }} mountPath: {{ .path }} {{- end }} {{- if eq .Values.server.config.authenticationType "PASSWORD" }} - mountPath: {{ .Values.server.config.path }}/auth name: password-volume {{- end }} {{- if eq .Values.prometheus.enabled "true" }} - name: telemetry-volume mountPath: /etc/trino/telemetry {{- end }} ports: - name: http containerPort: {{ .Values.service.port }} protocol: TCP livenessProbe: httpGet: path: /v1/info port: http initialDelaySeconds: {{ .Values.coordinator.livenessProbe.initialDelaySeconds | default 20 }} periodSeconds: {{ .Values.coordinator.livenessProbe.periodSeconds | default 10 }} timeoutSeconds: {{ .Values.coordinator.livenessProbe.timeoutSeconds | default 5 }} failureThreshold: {{ .Values.coordinator.livenessProbe.failureThreshold | default 6 }} successThreshold: {{ .Values.coordinator.livenessProbe.successThreshold | default 1 }} readinessProbe: httpGet: path: /v1/info port: http initialDelaySeconds: {{ .Values.coordinator.readinessProbe.initialDelaySeconds | default 20 }} periodSeconds: {{ .Values.coordinator.readinessProbe.periodSeconds | default 10 }} timeoutSeconds: {{ .Values.coordinator.readinessProbe.timeoutSeconds | default 5 }} failureThreshold: {{ .Values.coordinator.readinessProbe.failureThreshold | default 6 }} successThreshold: {{ .Values.coordinator.readinessProbe.successThreshold | default 1 }} resources: {{- toYaml .Values.coordinator.resources | nindent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinityCoordinator }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerationsCoordinator }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- end }}