Improve velero restore docs for PVCs that are shared between helm releases
I'm trying to do a test restore of my cluster's dashboard/sso db. I notice that the restore docs have shortcomings when dealing with multiple helmreleases that share a PVC, i.e. dashboard/sso.
Steps to document for restoring the Dashboard/SSO PVC:
flux suspend kustomization dashboard single-sign-on
flux suspend kustomization single-sign-on
flux suspend helmrelease -n stackspin dashboard
flux suspend helmrelease -n stackspin hydra
flux suspend helmrelease -n stackspin kratos
flux suspend helmrelease -n stackspin single-sign-on-database
kubectl delete all -n stackspin -l stackspin.net/backupSet=single-sign-on
kubectl delete -n stackspin deployments.apps dashboard
kubectl delete pvc -n stackspin -l stackspin.net/backupSet=single-sign-on
# PVC deletion hangs until the finalizer gets removed
kubectl -n stackspin patch pvc single-sign-on-database -p '{"metadata":{"finalizers":null}}'
velero restore create dashboard-test-restore --from-backup=velero-daily-20220901033021 -l stackspin.net/backupSet=single-sign-on
Todo:
stackspin: could not restore, Secret "single-sign-on-database-mariadb" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, ConfigMap "single-sign-on-database-mariadb" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, Pod "single-sign-on-database-mariadb-0" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, Endpoints "single-sign-on-database-mariadb" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, Service "single-sign-on-database-mariadb" already exists. Warning: the in-cluster version is different than the backed-up version.
Edited by Varac