apiVersion: keda.sh/v1alpha1 kind: ScaledJob metadata: name: {{ include "conversion-engine.fullname" . }} labels: {{- include "conversion-engine.labels" . | nindent 4 }} spec: failedJobsHistoryLimit: 5 jobTargetRef: activeDeadlineSeconds: 86400 completions: 1 parallelism: 1 template: metadata: creationTimestamp: null spec: imagePullSecrets: - name: {{ .Values.image.pullSecret }} affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: matchExpressions: - key: scaledjob.keda.sh/name operator: In values: - conversion-engine-consumer topologyKey: kubernetes.io/hostname weight: 100 {{- if .Values.cicd.enabled }} initContainers: - name: init-storage image: quay01.ipa.endofday.com/goghvideo/rockylinux:9-ubi env: - name: sourcefile value: "{{ uuidv4 }}" command: ['sh', '-c', "cd {{ .Values.mount.path }} && curl -o ${sourcefile} {{ .Values.cicd.testFile }}"] volumeMounts: - mountPath: "{{ .Values.mount.path }}" name: "{{ .Values.mount.name }}" {{- end }} containers: - env: - name: amqp valueFrom: secretKeyRef: key: url name: amqp image: "{{ .Values.image.repository }}:{{ trim .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: Always name: transcode-job resources: requests: cpu: "4" memory: 2Gi volumeMounts: - mountPath: "{{ .Values.mount.path }}" name: "{{ .Values.mount.name }}" volumes: - name: "{{ .Values.volumes.name }}" persistentVolumeClaim: claimName: "{{ .Values.volumes.claimName }}" maxReplicaCount: 4 pollingInterval: 60 successfulJobsHistoryLimit: 5 triggers: - authenticationRef: name: "{{ .Values.keda.authenticationRef }}" metadata: includeUnacked: "false" queueLength: "1" queueName: "{{ .Values.keda.queueName }}" type: rabbitmq