--- apiVersion: batch/v1 kind: CronJob metadata: name: music-transcode namespace: default spec: schedule: "0 2 * * *" suspend: true concurrencyPolicy: "Forbid" successfulJobsHistoryLimit: 3 failedJobsHistoryLimit: 5 jobTemplate: spec: backoffLimit: 3 ttlSecondsAfterFinished: 300 template: spec: automountServiceAccountToken: false restartPolicy: OnFailure initContainers: containers: - name: transcode-incremental image: ghcr.io/auricom/freac:1.1.6@sha256:e02083a059cecd49e3d6169c59b5e5bcd139eb648d2c90967787d4dc51375ddf imagePullPolicy: IfNotPresent env: - name: TRANSCODE_INPUT_DIR value: /mnt/music/ - name: TRANSCODE_OUTPUT_DIR value: /mnt/music_transcoded/ - name: TRANSCODE_FREAC_BIN value: /app/freaccmd command: - "/bin/bash" - "-c" - | #!/bin/bash cp /app/transcode/transcode.sh /tmp/transcode.sh cp /app/transcode/transcode_exclude.cfg /tmp/transcode_exclude.cfg chmod +x /tmp/transcode.sh cd /tmp ./transcode.sh -c ./transcode.sh -r volumeMounts: - name: music-transcoded mountPath: /mnt/music_transcoded - name: music mountPath: /mnt/music - name: scripts mountPath: /app/scripts readOnly: true volumes: - name: music-transcoded nfs: server: "${LOCAL_LAN_TRUENAS}" path: /mnt/storage/music_transcoded - name: music nfs: server: "${LOCAL_LAN_TRUENAS}" path: /mnt/storage/music - name: scripts configMap: name: transcode-configmap