~sbaildon/cluster

ref: a8baba7c cluster/projects/crave_supply/database/backups/prune.yaml -rw-r--r-- 1.5 KiB
a8baba7cSean Baildon container registry 0 replicas a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: backup-prune
spec:
  schedule: "30 5 */1 * *"
  suspend: true
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: backup
              image: docker.io/restic/restic:0.12.0
              imagePullPolicy: IfNotPresent
              command:
                - restic
              args:
                - forget
                - --prune
                - --keep-hourly
                - "24"
                - --keep-daily
                - "7"
                - --keep-weekly
                - "8"
                - --keep-monthly
                - "24"
              env:
                - name: AWS_ACCESS_KEY_ID
                  valueFrom:
                    secretKeyRef:
                      name: postgres-backup-storage-credentials
                      key: access_key
                - name: AWS_SECRET_ACCESS_KEY
                  valueFrom:
                    secretKeyRef:
                      name: postgres-backup-storage-credentials
                      key: secret_key
                - name: RESTIC_REPOSITORY
                  valueFrom:
                    secretKeyRef:
                      name: postgres-backup-repository
                      key: repository
                - name: RESTIC_PASSWORD
                  valueFrom:
                    secretKeyRef:
                      name: postgres-backup-repository
                      key: password
          restartPolicy: OnFailure