From c31ab0d98bfb6499d28dc3c80b8acf8531aaf2d8 Mon Sep 17 00:00:00 2001
From: Janne Mareike Koschinski <janne@kuschku.de>
Date: Thu, 26 May 2022 16:16:28 +0200
Subject: [PATCH] feat: improve restic restart policy

---
 restic/templates/cronjob_backup.yaml | 1 +
 restic/templates/cronjob_forget.yaml | 1 +
 2 files changed, 2 insertions(+)

diff --git a/restic/templates/cronjob_backup.yaml b/restic/templates/cronjob_backup.yaml
index d28be75..f2b75a8 100644
--- a/restic/templates/cronjob_backup.yaml
+++ b/restic/templates/cronjob_backup.yaml
@@ -24,6 +24,7 @@ spec:
           labels:
             {{- include "restic-helm.labels" . | nindent 12 }}
         spec:
+          restartPolicy: OnFailure
           {{- with .Values.imagePullSecrets }}
           imagePullSecrets:
             {{- toYaml . | nindent 12 }}
diff --git a/restic/templates/cronjob_forget.yaml b/restic/templates/cronjob_forget.yaml
index cbd2e83..953113b 100644
--- a/restic/templates/cronjob_forget.yaml
+++ b/restic/templates/cronjob_forget.yaml
@@ -24,6 +24,7 @@ spec:
           labels:
             {{- include "restic-helm.labels" . | nindent 12 }}
         spec:
+          restartPolicy: OnFailure
           {{- with .Values.imagePullSecrets }}
           imagePullSecrets:
             {{- toYaml . | nindent 12 }}
-- 
GitLab