Files
auricom-home-cluster/cluster/apps/media/radarr/trash-updater-job.yaml
2021-08-18 11:55:22 +02:00

51 lines
1.5 KiB
YAML

---
apiVersion: batch/v1
kind: CronJob
metadata:
name: radarr-trash-updater
namespace: media
spec:
schedule: "@weekly"
jobTemplate:
spec:
template:
metadata:
name: radarr-trash-updater
spec:
serviceAccountName: jobs
imagePullSecrets:
- name: regcred
containers:
- name: trash-updater
image: registry.${SECRET_CLUSTER_DOMAIN}/homelab/home-cluster-jobs:1.2.0
imagePullPolicy: IfNotPresent
env:
- name: DOTNET_SYSTEM_GLOBALIZATION_INVARIANT
value: "1"
command:
- "bin/sh"
- "-ec"
- |
#!/bin/sh
set -o nounset
set -o errexit
cd /tmp
curl --location https://github.com/rcdailey/trash-updater/releases/latest/download/trash-linux-x64.zip --output ./trash.zip
unzip trash.zip
chmod 755 trash
./trash radarr --config /opt/trash.yaml
curl -m 10 --retry 5 http://healthchecks.monitoring.svc.cluster.local.:8000/ping/4776417a-8410-4c33-91ca-20e4284254f0
volumeMounts:
- name: config
mountPath: /opt/trash.yaml
subPath: trash.yaml
volumes:
- name: config
configMap:
name: radarr-trash-updater-config
restartPolicy: Never