{{- if .Values.app.videoConverter.enabled }} {{- $name := include "hrbox.component" (dict "ctx" . "name" "file-processor-video") -}} {{/* Конвертация видео. Отдельный деплоймент, потому что профиль ресурсов у него другой на порядок: несколько ядер, гигабайты памяти и десятки гигабайт временного диска на под. Смешивать это с обычной обработкой файлов нельзя — либо ресурсы простаивают, либо конвертация видео вытесняет всё остальное. Через nodeSelector и tolerations пул выносится на выделенные ноды. */}} --- apiVersion: apps/v1 kind: Deployment metadata: name: {{ $name }} labels: {{- include "hrbox.labels" (dict "ctx" . "name" "file-processor-video") | nindent 4 }} spec: minReadySeconds: 5 strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 1 replicas: {{ .Values.app.replicas.fileProcessorVideo }} selector: matchLabels: {{- include "hrbox.selectorLabels" (dict "ctx" . "name" "file-processor-video") | nindent 6 }} template: metadata: labels: {{- include "hrbox.selectorLabels" (dict "ctx" . "name" "file-processor-video") | nindent 8 }} app: file-processor annotations: checksum/app-secret: {{ include (print $.Template.BasePath "/00-app-secret.yaml") . | sha256sum }} spec: {{- with .Values.app.videoConverter.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.app.videoConverter.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- include "hrbox.imagePullSecrets" . | nindent 6 }} containers: - name: file-processor image: {{ .Values.image.fileProcessor | quote }} imagePullPolicy: {{ .Values.image.pullPolicy }} env: {{- include "envs_all" . | indent 12 }} - name: VIDEO_CONVERTER_ENABLED value: "true" - name: IMAGE_RESIZE_MAX_PARALLEL value: {{ .Values.app.fileProcessor.imageResizeMaxParallel | quote }} {{- include "hrbox.resources" (dict "ctx" . "component" "fileProcessorVideo") | indent 10 }} {{- end }}