diff --git a/rust/operator-binary/src/history/history_controller.rs b/rust/operator-binary/src/history/history_controller.rs index f919cebb..c3c55502 100644 --- a/rust/operator-binary/src/history/history_controller.rs +++ b/rust/operator-binary/src/history/history_controller.rs @@ -5,6 +5,7 @@ use stackable_operator::{ builder::{ConfigMapBuilder, ContainerBuilder, ObjectMetaBuilder, PodBuilder, VolumeBuilder}, cluster_resources::{ClusterResourceApplyStrategy, ClusterResources}, commons::product_image_selection::ResolvedProductImage, + duration::Duration, k8s_openapi::{ api::{ apps::v1::{StatefulSet, StatefulSetSpec}, @@ -45,8 +46,8 @@ use stackable_spark_k8s_crd::{ s3logdir::S3LogDir, tlscerts, }; +use std::collections::HashMap; use std::{collections::BTreeMap, sync::Arc}; -use std::{collections::HashMap, time::Duration}; use snafu::{OptionExt, ResultExt, Snafu}; use stackable_operator::builder::resources::ResourceRequirementsBuilder; @@ -283,7 +284,7 @@ pub async fn reconcile(shs: Arc, ctx: Arc) -> Result, _error: &Error, _ctx: Arc) -> Action { - Action::requeue(Duration::from_secs(5)) + Action::requeue(*Duration::from_secs(5)) } fn build_config_map( diff --git a/rust/operator-binary/src/pod_driver_controller.rs b/rust/operator-binary/src/pod_driver_controller.rs index 4712e817..478e61a7 100644 --- a/rust/operator-binary/src/pod_driver_controller.rs +++ b/rust/operator-binary/src/pod_driver_controller.rs @@ -1,11 +1,11 @@ use stackable_operator::{ - client::Client, k8s_openapi::api::core::v1::Pod, kube::runtime::controller::Action, + client::Client, duration::Duration, k8s_openapi::api::core::v1::Pod, + kube::runtime::controller::Action, }; use stackable_spark_k8s_crd::{ constants::POD_DRIVER_CONTROLLER_NAME, SparkApplication, SparkApplicationStatus, }; use std::sync::Arc; -use std::time::Duration; use snafu::{OptionExt, ResultExt, Snafu}; use stackable_operator::logging::controller::ReconcilerError; @@ -95,5 +95,5 @@ pub async fn reconcile(pod: Arc, client: Arc) -> Result { } pub fn error_policy(_obj: Arc, _error: &Error, _ctx: Arc) -> Action { - Action::requeue(Duration::from_secs(5)) + Action::requeue(*Duration::from_secs(5)) } diff --git a/rust/operator-binary/src/spark_k8s_controller.rs b/rust/operator-binary/src/spark_k8s_controller.rs index c27ef575..d29332a9 100644 --- a/rust/operator-binary/src/spark_k8s_controller.rs +++ b/rust/operator-binary/src/spark_k8s_controller.rs @@ -3,11 +3,10 @@ use crate::Ctx; use std::{ collections::{BTreeMap, HashMap}, sync::Arc, - time::Duration, vec, }; -use stackable_operator::product_config::writer::to_java_properties_string; +use stackable_operator::{duration::Duration, product_config::writer::to_java_properties_string}; use stackable_spark_k8s_crd::{ constants::*, s3logdir::S3LogDir, tlscerts, RoleConfig, SparkApplication, SparkApplicationRole, SparkContainer, SubmitConfig, @@ -863,5 +862,5 @@ fn security_context() -> PodSecurityContext { } pub fn error_policy(_obj: Arc, _error: &Error, _ctx: Arc) -> Action { - Action::requeue(Duration::from_secs(5)) + Action::requeue(*Duration::from_secs(5)) }