|
| 1 | +{{- if gt (int .Values.celery_worker_user_file_processing.replicaCount) 0 }} |
| 2 | +apiVersion: apps/v1 |
| 3 | +kind: Deployment |
| 4 | +metadata: |
| 5 | + name: {{ include "onyx-stack.fullname" . }}-celery-worker-user-file-processing |
| 6 | + labels: |
| 7 | + {{- include "onyx-stack.labels" . | nindent 4 }} |
| 8 | +spec: |
| 9 | + {{- if not .Values.celery_worker_user_file_processing.autoscaling.enabled }} |
| 10 | + replicas: {{ .Values.celery_worker_user_file_processing.replicaCount }} |
| 11 | + {{- end }} |
| 12 | + selector: |
| 13 | + matchLabels: |
| 14 | + {{- include "onyx-stack.selectorLabels" . | nindent 6 }} |
| 15 | + {{- if .Values.celery_worker_user_file_processing.deploymentLabels }} |
| 16 | + {{- toYaml .Values.celery_worker_user_file_processing.deploymentLabels | nindent 6 }} |
| 17 | + {{- end }} |
| 18 | + template: |
| 19 | + metadata: |
| 20 | + annotations: |
| 21 | + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} |
| 22 | + {{- with .Values.celery_worker_user_file_processing.podAnnotations }} |
| 23 | + {{- toYaml . | nindent 8 }} |
| 24 | + {{- end }} |
| 25 | + labels: |
| 26 | + {{- include "onyx-stack.labels" . | nindent 8 }} |
| 27 | + {{- with .Values.celery_worker_user_file_processing.podLabels }} |
| 28 | + {{- toYaml . | nindent 8 }} |
| 29 | + {{- end }} |
| 30 | + spec: |
| 31 | + {{- with .Values.imagePullSecrets }} |
| 32 | + imagePullSecrets: |
| 33 | + {{- toYaml . | nindent 8 }} |
| 34 | + {{- end }} |
| 35 | + serviceAccountName: {{ include "onyx-stack.serviceAccountName" . }} |
| 36 | + securityContext: |
| 37 | + {{- toYaml .Values.celery_shared.podSecurityContext | nindent 8 }} |
| 38 | + {{- with .Values.celery_worker_user_file_processing.nodeSelector }} |
| 39 | + nodeSelector: |
| 40 | + {{- toYaml . | nindent 8 }} |
| 41 | + {{- end }} |
| 42 | + containers: |
| 43 | + - name: celery-worker-user-file-processing |
| 44 | + securityContext: |
| 45 | + {{- toYaml .Values.celery_shared.securityContext | nindent 12 }} |
| 46 | + image: "{{ .Values.celery_shared.image.repository }}:{{ .Values.celery_shared.image.tag | default .Values.global.version }}" |
| 47 | + imagePullPolicy: {{ .Values.global.pullPolicy }} |
| 48 | + command: |
| 49 | + [ |
| 50 | + "celery", |
| 51 | + "-A", |
| 52 | + "onyx.background.celery.versioned_apps.user_file_processing", |
| 53 | + "worker", |
| 54 | + "--loglevel=INFO", |
| 55 | + "--hostname=user-file-processing@%n", |
| 56 | + "-Q", |
| 57 | + "user_file_processing,user_file_project_sync", |
| 58 | + ] |
| 59 | + resources: |
| 60 | + {{- toYaml .Values.celery_worker_user_file_processing.resources | nindent 12 }} |
| 61 | + envFrom: |
| 62 | + - configMapRef: |
| 63 | + name: {{ .Values.config.envConfigMapName }} |
| 64 | + env: |
| 65 | + {{- include "onyx-stack.envSecrets" . | nindent 12}} |
| 66 | + {{- with .Values.celery_worker_user_file_processing.volumeMounts }} |
| 67 | + volumeMounts: |
| 68 | + {{- toYaml . | nindent 12 }} |
| 69 | + {{- end }} |
| 70 | + startupProbe: |
| 71 | + {{ .Values.celery_shared.startupProbe | toYaml | nindent 12}} |
| 72 | + readinessProbe: |
| 73 | + {{ .Values.celery_shared.readinessProbe | toYaml | nindent 12}} |
| 74 | + livenessProbe: |
| 75 | + {{ .Values.celery_shared.livenessProbe | toYaml | nindent 12}} |
| 76 | + {{- with .Values.celery_worker_user_file_processing.volumes }} |
| 77 | + volumes: |
| 78 | + {{- toYaml . | nindent 8 }} |
| 79 | + {{- end }} |
| 80 | +{{- end }} |
| 81 | + |
| 82 | + |
0 commit comments