Files
auricom-home-cluster/kubernetes/apps/default/recyclarr/app/cronjob.yaml
2022-12-31 00:20:22 +01:00

63 lines
1.8 KiB
YAML

---
apiVersion: batch/v1
kind: CronJob
metadata:
name: recyclarr
namespace: default
spec:
schedule: "@daily"
jobTemplate:
spec:
ttlSecondsAfterFinished: 86400
template:
spec:
automountServiceAccountToken: false
restartPolicy: OnFailure
initContainers:
- name: render-configs
image: ghcr.io/onedr0p/alpine:3.17.0
envFrom:
- secretRef:
name: radarr
- secretRef:
name: sonarr
command:
- "/bin/bash"
- -c
args:
- "envsubst < /config/recyclarr.yml > /shared/recyclarr.yml"
volumeMounts:
- name: config
mountPath: /config
- name: shared
mountPath: /shared
containers:
- name: sonarrs
image: ghcr.io/recyclarr/recyclarr:4.1.0
command:
- /app/recyclarr/recyclarr
args:
- sonarr
volumeMounts:
- name: shared
mountPath: /config/recyclarr.yml
subPath: recyclarr.yml
readOnly: true
- name: radarrs
image: ghcr.io/recyclarr/recyclarr:4.1.0
command:
- /app/recyclarr/recyclarr
args:
- radarr
volumeMounts:
- name: shared
mountPath: /config/recyclarr.yml
subPath: recyclarr.yml
readOnly: true
volumes:
- name: config
configMap:
name: recyclarr-configmap
- name: shared
emptyDir: {}