-
Notifications
You must be signed in to change notification settings - Fork 91
Conversation
evals/roles/enmasse/tasks/backup.yml
Outdated
|
||
# Delete the old backup cronjob in case this is a re-installation | ||
- name: Remove old cronjob | ||
shell: oc delete cronjob {{ enmasse_backup_cronjob_name }} --ignore-not-found -n {{ enmasse_namespace }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, the idea was to make sure the job gets updated when the properties change but for that we can use apply
. Will update this.
19f87c5
to
b78940a
Compare
👀 |
enmasse_backup_postgres_secret: 'enmasse-postgres-secret' | ||
enmasse_postgres_cronjob_name: 'postgres-backup' | ||
enmasse_pv_cronjob_name: 'pv-backup' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are creating all CronJobs in default namespace, two names above should be prepended with 'enmasse-', just to avoid any ambiguity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Verified
Creates the enmasse backup cronjob.
Sets up a CronJob to backup the kubernetes resources.
Verification:
To test that the files in the PV are backed up you need a brokered AMQ:
/var/run/artemis
echo "test" > /var/run/artemis/test.txt
Then you can verify the backup using:
In the enmasse namespace
1.1 Ensure the postgres-backup Pod succeeds
1.1 Ensure the PV backup succeeds and the archive contains the file generated for the brokered pod.
1.1 Check S3 and ensure the archives have been pushed up.
1.1 Delete the CronJobs in all namespaces