diff --git a/rust/operator/src/kafka_controller.rs b/rust/operator/src/kafka_controller.rs index 8fe6dd20..8e970cbf 100644 --- a/rust/operator/src/kafka_controller.rs +++ b/rust/operator/src/kafka_controller.rs @@ -31,6 +31,7 @@ use stackable_operator::{ authentication::AuthenticationClass, opa::OpaApiVersion, product_image_selection::ResolvedProductImage, rbac::build_rbac_resources, }, + duration::Duration, k8s_openapi::{ api::{ apps::v1::{StatefulSet, StatefulSetSpec}, @@ -72,7 +73,6 @@ use std::{ borrow::Cow, collections::{BTreeMap, HashMap}, sync::Arc, - time::Duration, }; use strum::{EnumDiscriminants, IntoStaticStr}; @@ -988,7 +988,7 @@ fn build_broker_rolegroup_statefulset( } pub fn error_policy(_obj: Arc, _error: &Error, _ctx: Arc) -> Action { - Action::requeue(Duration::from_secs(5)) + Action::requeue(*Duration::from_secs(5)) } /// We only expose client HTTP / HTTPS and Metrics ports. diff --git a/rust/operator/src/pod_svc_controller.rs b/rust/operator/src/pod_svc_controller.rs index 9d6f9573..584e04f4 100644 --- a/rust/operator/src/pod_svc_controller.rs +++ b/rust/operator/src/pod_svc_controller.rs @@ -1,6 +1,7 @@ use snafu::{OptionExt, ResultExt, Snafu}; use stackable_kafka_crd::APP_NAME; use stackable_operator::{ + duration::Duration, k8s_openapi::{ api::core::v1::{Container, Pod, Service, ServicePort, ServiceSpec}, apimachinery::pkg::apis::meta::v1::OwnerReference, @@ -8,7 +9,7 @@ use stackable_operator::{ kube::{core::ObjectMeta, runtime::controller::Action}, logging::controller::ReconcilerError, }; -use std::{sync::Arc, time::Duration}; +use std::sync::Arc; use strum::{EnumDiscriminants, IntoStaticStr}; pub const POD_SERVICE_CONTROLLER_NAME: &str = "pod-service"; @@ -96,5 +97,5 @@ pub async fn reconcile_pod(pod: Arc, ctx: 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)) }