small-hack/argocd-apps

matrix PVCs are duplicated and need backups

Closed this issue · 2 comments

not sure why, but we should look into why the matrix app's PVCs are duplicated:

NAME                          STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
matrix-postgresql             Bound     pvc-a056dfda-27d0-4022-96e1-26f39a576a9f   3Gi        RWO            local-path     17h
matrix-stack-signing-key      Bound     pvc-0fac20cc-d4de-4565-bdc8-ade8c8b296cd   1Mi        RWO            local-path     14h
matrix-stack-media-store      Bound     pvc-8fadb8f4-e878-4c4a-8b2e-d162a182d4f0   10Gi       RWO            local-path     14h
matrix-synapse-config         Pending                                                                        local-path     75m
matrix-signing-key            Pending                                                                        local-path     75m
matrix-media                  Pending                                                                        local-path     75m
matrix-stack-synapse-config   Bound     pvc-646c2a90-0c3e-4ced-871f-e170eb06042a   1Mi        RWO            local-path     12m

I think I found the duplicate issue and I think I've fixed it in ebeee4fd955bbbfd3009778b15428f77416484c4

We weren't passing in existing PVC claim 🙃 That's solved, but we still need backups...maybe? 🤷 also need to take a look at small-hack/matrix-chart#470

We now have scheduled backups here as part of the default /matrix/app_of_apps:

schedules:
backup: "{{ .matrix_pvc_backup_schedule }}"
check: "0 0 * * *"
prune: "0 0 * * *"

Which uses this local chart which deploys K8up scheduled backups here:

# Backup nightly at scheduled time (Central Europe Time)
backup:
schedule: {{ .Values.k8up.schedules.backup }}
failedJobsHistoryLimit: 5
successfulJobsHistoryLimit: 2
promURL: {{ .Values.k8up.prometheus_url }}
{{- if .Values.k8up.podSecurityContext }}
podSecurityContext:
runAsUser: {{ .Values.k8up.podSecurityContext.runAsUser }}
{{- end }}
# verify the backups are ok
check:
schedule: {{ .Values.k8up.schedules.check }}
promURL: {{ .Values.k8up.prometheus_url }}
# delete old backups
prune:
schedule: {{ .Values.k8up.schedules.prune }}
retention:
keepDaily: 7
keepWeekly: 8