kube-backup
kube-backup copied to clipboard
Always clone a fresh copy of the repo
The restart policy of OnFailure causes the same pod to be restarted if there's a problem. This is an issue if that pod already has the changes checked in, as the rest of the script will not find changes (or attempt to commit or push them) resulting in the second attempt always passing (masking the problem). This change ensure's there's a clean repo on each run, so successive restarts will correctly try (and potentially fail) again.
My attempt to fix the following issue: https://github.com/pieterlange/kube-backup/issues/66