This repository has been archived on 2026-06-19. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
kitestacks-homelab-autosync.../apps/kavita-docker-automation/kavita-docker-restart-cronjob.yaml
2026-06-05 09:42:57 -05:00

32 lines
884 B
YAML

apiVersion: batch/v1
kind: CronJob
metadata:
name: kavita-docker-auto-restart
namespace: automation
spec:
schedule: "*/15 * * * *"
successfulJobsHistoryLimit: 2
failedJobsHistoryLimit: 3
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: restart-kavita
image: docker:27-cli
command:
- /bin/sh
- -c
- |
echo "Restarting Kavita Docker container..."
docker restart kavita
echo "Kavita restart completed."
volumeMounts:
- name: docker-sock
mountPath: /var/run/docker.sock
volumes:
- name: docker-sock
hostPath:
path: /var/run/docker.sock
type: Socket