@@ -25,13 +25,7 @@ use stackable_operator::{
2525use strum:: { EnumDiscriminants , IntoStaticStr } ;
2626
2727use crate :: {
28- crd:: {
29- druidconnection:: v1alpha1:: {
30- DruidConnection , DruidConnectionStatus , DruidConnectionStatusCondition ,
31- } ,
32- v1alpha1:: SupersetCluster ,
33- PYTHONPATH , SUPERSET_CONFIG_FILENAME ,
34- } ,
28+ crd:: { druidconnection, v1alpha1, PYTHONPATH , SUPERSET_CONFIG_FILENAME } ,
3529 rbac,
3630 superset_controller:: DOCKER_IMAGE_BASE_NAME ,
3731 util:: { get_job_state, JobState } ,
@@ -81,7 +75,7 @@ pub enum Error {
8175 #[ snafu( display( "namespace missing on DruidConnection {druid_connection}" ) ) ]
8276 DruidConnectionNoNamespace {
8377 source : crate :: crd:: druidconnection:: Error ,
84- druid_connection : ObjectRef < DruidConnection > ,
78+ druid_connection : ObjectRef < druidconnection :: v1alpha1 :: DruidConnection > ,
8579 } ,
8680 #[ snafu( display( "failed to patch service account" ) ) ]
8781 ApplyServiceAccount {
@@ -132,7 +126,7 @@ impl ReconcilerError for Error {
132126}
133127
134128pub async fn reconcile_druid_connection (
135- druid_connection : Arc < DeserializeGuard < DruidConnection > > ,
129+ druid_connection : Arc < DeserializeGuard < druidconnection :: v1alpha1 :: DruidConnection > > ,
136130 ctx : Arc < Ctx > ,
137131) -> Result < Action > {
138132 tracing:: info!( "Starting reconciling DruidConnections" ) ;
@@ -160,7 +154,7 @@ pub async fn reconcile_druid_connection(
160154
161155 if let Some ( ref s) = druid_connection. status {
162156 match s. condition {
163- DruidConnectionStatusCondition :: Pending => {
157+ druidconnection :: v1alpha1 :: DruidConnectionStatusCondition :: Pending => {
164158 // Is the referenced druid discovery configmap there?
165159 let druid_discovery_cm_exists = client
166160 . get_opt :: < ConfigMap > (
@@ -176,7 +170,7 @@ pub async fn reconcile_druid_connection(
176170 . is_some ( ) ;
177171
178172 let superset_cluster = client
179- . get :: < SupersetCluster > (
173+ . get :: < v1alpha1 :: SupersetCluster > (
180174 & druid_connection. superset_name ( ) ,
181175 & druid_connection. superset_namespace ( ) . context (
182176 DruidConnectionNoNamespaceSnafu {
@@ -237,7 +231,7 @@ pub async fn reconcile_druid_connection(
237231 . context ( ApplyStatusSnafu ) ?;
238232 }
239233 }
240- DruidConnectionStatusCondition :: Importing => {
234+ druidconnection :: v1alpha1 :: DruidConnectionStatusCondition :: Importing => {
241235 let ns = druid_connection
242236 . namespace ( )
243237 . unwrap_or_else ( || "default" . to_string ( ) ) ;
@@ -262,16 +256,16 @@ pub async fn reconcile_druid_connection(
262256 . context ( ApplyStatusSnafu ) ?;
263257 }
264258 }
265- DruidConnectionStatusCondition :: Ready => ( ) ,
266- DruidConnectionStatusCondition :: Failed => ( ) ,
259+ druidconnection :: v1alpha1 :: DruidConnectionStatusCondition :: Ready => ( ) ,
260+ druidconnection :: v1alpha1 :: DruidConnectionStatusCondition :: Failed => ( ) ,
267261 }
268262 } else {
269263 // Status not set yet, initialize
270264 client
271265 . apply_patch_status (
272266 DRUID_CONNECTION_CONTROLLER_NAME ,
273267 druid_connection,
274- & DruidConnectionStatus :: new ( ) ,
268+ & druidconnection :: v1alpha1 :: DruidConnectionStatus :: new ( ) ,
275269 )
276270 . await
277271 . context ( ApplyStatusSnafu ) ?;
@@ -306,8 +300,8 @@ fn build_druid_db_yaml(druid_cluster_name: &str, sqlalchemy_str: &str) -> Result
306300
307301/// Builds the import job. When run it will import the druid connection into the database.
308302async fn build_import_job (
309- superset_cluster : & SupersetCluster ,
310- druid_connection : & DruidConnection ,
303+ superset_cluster : & v1alpha1 :: SupersetCluster ,
304+ druid_connection : & druidconnection :: v1alpha1 :: DruidConnection ,
311305 resolved_product_image : & ResolvedProductImage ,
312306 sqlalchemy_str : & str ,
313307 sa_name : & str ,
@@ -378,7 +372,7 @@ async fn build_import_job(
378372}
379373
380374pub fn error_policy (
381- _obj : Arc < DeserializeGuard < DruidConnection > > ,
375+ _obj : Arc < DeserializeGuard < druidconnection :: v1alpha1 :: DruidConnection > > ,
382376 error : & Error ,
383377 _ctx : Arc < Ctx > ,
384378) -> Action {
0 commit comments