From 94f7c56932cd75bfabf934410038005953a7872b Mon Sep 17 00:00:00 2001 From: Timo Behrendt Date: Wed, 5 Feb 2025 19:18:23 +0100 Subject: [PATCH] improve cronjob example with best practices --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8321b91..3f385f4 100644 --- a/README.md +++ b/README.md @@ -50,16 +50,23 @@ Ensure the following commands are available in the container: Example Kubernetes CronJob manifest for running BackupSidecar as a cron job for directory backups in minimal configuration: ```yaml -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: name: backupsidecar-cron + namespace: authentik spec: - schedule: "0 2 * * *" # Run daily at 2:00 AM + schedule: "0 7 * * *" + concurrencyPolicy: Forbid + successfulJobsHistoryLimit: 5 + failedJobsHistoryLimit: 3 jobTemplate: spec: + backoffLimit: 3 + activeDeadlineSeconds: 300 template: spec: + restartPolicy: OnFailure containers: - name: backupsidecar image: backupsidecar:latest