Skip to content

Commit

Permalink
Update hibernate.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
nhudson authored Dec 17, 2024
1 parent 1afc6bc commit 873a5ae
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tembo-operator/src/cloudnativepg/hibernate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ use tracing::{debug, error, info, warn};
///
/// Returns a normal, jittered requeue when the instance is stopped.
pub async fn reconcile_cluster_hibernation(cdb: &CoreDB, ctx: &Arc<Context>) -> Result<(), Action> {
// We should check if the instance needs to be stopped first before running through this
if !cdb.spec.stop {
debug!(
"Skipping hibernation reconciliation for CoreDB instance {}",
cdb.name_any()
);
return Ok(());
}

info!(
"Reconciling hibernation for CoreDB instance {}",
cdb.name_any()
Expand Down

0 comments on commit 873a5ae

Please sign in to comment.