diff --git a/apps/operator/src/controller/migrate.rs b/apps/operator/src/controller/migrate.rs index 47ce299..673351a 100644 --- a/apps/operator/src/controller/migrate.rs +++ b/apps/operator/src/controller/migrate.rs @@ -71,10 +71,10 @@ async fn query_job_status( "Pending" }; - let start_time = status.and_then(|s| s.start_time.as_ref()).map(|t| t.to_string()); - let completion_time = status.and_then(|s| s.completion_time.as_ref()).map(|t| t.to_string()); + let start_time = status.and_then(|s| s.start_time.as_ref()).map(|t| t.0.to_rfc3339()); + let completion_time = status.and_then(|s| s.completion_time.as_ref()).map(|t| t.0.to_rfc3339()); - Ok(JobStatusResult { phase, start_time, completion_time }) + Ok(JobStatusResult { phase: phase.to_string(), start_time, completion_time }) } Err(kube::Error::Api(e)) if e.code == 404 => { Ok(JobStatusResult { phase: "Pending".to_string(), start_time: None, completion_time: None })