Follow up for #337. In 337, we created a helm template & make target in the cas-obps-postgres repo that will deploy a postgres cluster to a destination namespace (we used our -tools namespace) and restore that cluster from a source namespace's database backups.
We can likely automate this process. The automated test process should:
spin up and restore a cluster from a specified namespace's db backups in a separate namespace (-tools)
if the cluster fails to restore, send an email to a notification list
if the cluster fails a recency check (daily timestamp?) it should also send an email to a notification list
if the cluster fails either check, it should not be torn down (so it can be investigated)
if the cluster restores properly and passes a recency check, it should tear down the cluster.
Follow up for #337. In 337, we created a helm template & make target in the cas-obps-postgres repo that will deploy a postgres cluster to a destination namespace (we used our -tools namespace) and restore that cluster from a source namespace's database backups.
We can likely automate this process. The automated test process should:
There is an example in the CIF repo where this was done previously (without the email notification steps) which can be used as a starting point on how to implement this: https://github.com/bcgov/cas-cif/tree/develop/database_backup_test original PR for cas-obps-postgres: https://github.com/bcgov/cas-obps-postgres/pull/7
The CIF example works like this: