Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve Error Handling + Code refactor (#891)
Fixes: #881 **Error and Metrics Handling:** - [x] BackupConfiguration Controller: - Failed to trigger workload controller: - Write event to BackupConfiguration - Log error - Failed to ensure cronjob: - Write event to BackupConfiguration - Log error - [x] BackupSession Controller: - Failed to ensure backup job: - Write event to BackupSession - Log error - Fail BackupSeesion - Backup session failed: - Set BackupSession phase to "Failed" - Write event to BackupSession - Send backup session specific metrics - BackupSession succeeded: - Set BackupSession phase to "Succeeded" - Write event to BackupSession - Send backup session specific metrics - [x] Auto Backup: - Failed/Succeeded to create/delete auto backup resources - Write event to the respective resource - Write log - [x] Workload Controller: - Failed/Succeeded to inject/delete stash sidecar/init-container - Write event to workload - Write log - [x] RestoreSession Controller: - Failed to create restore job - Write event to RestoreSession - Write log - Fail RestoreSession - Restore session failed: - Set RestoreSession phase to "Failed" - Write event to RestoreSession - Send restore session specific metrics - RestoreSession succeeded: - Set RestoreSession phase to "Succeeded" - Write event to RestoreSession - Send restore session specific metrics - [x] Sidecar: - Failed to start BackupSession controller - Write event to BackupConfiguration - Write log - Fail the container so it restart - Succeeded to start BackupSession controller - Write event to BackupConfiguration - Write log - Failed/Succeeded to take backup - Update status of the BackupSession - Write log - [x] Init-container/Backup Job: - Failed/Succeeded to restore - Update status of the RestoreSession - Write log - Fail the container
- Loading branch information