BCDevOps / backup-container

A simple container for a simple backup strategy.
Apache License 2.0
39 stars 56 forks source link

Mark cronjob pods as failed on backup operation failure #91

Open jujaga opened 2 years ago

jujaga commented 2 years ago

For cronjob deployments on OCP4, the current behavior always exits and marks the pod status as Completed, meaning that the only way to discover if the task actually succeeded or failed is by inspecting the pod logs.

It would be beneficial to be able to tell at a glance as to whether a database backup operation succeeded or failed based on whether the pod status is marked as Completed or Failed when acquiring a pod list. This would likely need the main backup-container script to change its behavior to detect when a backup operation fails and exit with a non-zero status.