Skip to content

Commit

Permalink
chore: added error log on reconcile error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobressan committed Dec 29, 2023
1 parent 7563a1f commit 0ec6491
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion operator/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use kube::{
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use std::{sync::Arc, time::Duration};
use tracing::{info, instrument};
use tracing::{error, info, instrument};

use crate::{
auth::handle_auth,
Expand Down Expand Up @@ -70,6 +70,7 @@ async fn reconcile(crd: Arc<OgmiosPort>, ctx: Arc<Context>) -> Result<Action> {
}

fn error_policy(crd: Arc<OgmiosPort>, err: &Error, ctx: Arc<Context>) -> Action {
error!(error = err.to_string(), "reconcile failed");
ctx.metrics.reconcile_failure(&crd, err);
Action::requeue(Duration::from_secs(5))
}
Expand Down

0 comments on commit 0ec6491

Please sign in to comment.