mirror of
https://github.com/auricom/home-cluster.git
synced 2025-09-17 18:24:14 +02:00
✨ new talos cluster
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
---
|
||||
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:596e72016ca4fea9767a68377722694c5005a4eec6e1400a5d1119160481656b
|
||||
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
|
||||
|
||||
HEALTHCHECKS=true
|
||||
|
||||
curl --location raw.githubusercontent.com/auricom/home-ops/main/scripts/transcode_music/transcode.bash --output /tmp/transcode.bash
|
||||
chmod a+x /tmp/transcode.bash
|
||||
curl --location raw.githubusercontent.com/auricom/home-ops/main/scripts/transcode_music/transcode_exclude.cfg --output /tmp/transcode_exclude.cfg
|
||||
cd /tmp
|
||||
./transcode.bash -c
|
||||
test $? -ne 0 && HEALTHCHECKS=false
|
||||
./transcode.bash -r
|
||||
test $? -ne 0 && HEALTHCHECK=false
|
||||
|
||||
test FLAG && curl -m 10 --retry 5 http://healthchecks.default.svc.cluster.local.:/ping/${SECRET_HEALTHCHECKS_PING_KEY}/k3s-transcode-music
|
||||
volumeMounts:
|
||||
- name: music-transcoded
|
||||
mountPath: /mnt/music_transcoded
|
||||
- name: music
|
||||
mountPath: /mnt/music
|
||||
volumes:
|
||||
- name: music-transcoded
|
||||
nfs:
|
||||
server: "${LOCAL_LAN_TRUENAS}"
|
||||
path: /mnt/music_transcoded
|
||||
- name: music
|
||||
nfs:
|
||||
server: "${LOCAL_LAN_TRUENAS}"
|
||||
path: /mnt/storage/music
|
@@ -0,0 +1,5 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- cronjob.yaml
|
Reference in New Issue
Block a user