@@ -15,10 +15,7 @@ use super::{
1515 pod_info:: { PodInfo , SchedulingPodInfo } ,
1616 tls,
1717} ;
18- use crate :: {
19- crd:: { self , SecretClass } ,
20- utils:: Unloggable ,
21- } ;
18+ use crate :: { crd:: v1alpha1, utils:: Unloggable } ;
2219
2320pub struct DynError ( Box < dyn SecretBackendError > ) ;
2421
@@ -129,18 +126,18 @@ impl SecretBackendError for FromClassError {
129126
130127pub async fn from_class (
131128 client : & stackable_operator:: client:: Client ,
132- class : SecretClass ,
129+ class : v1alpha1 :: SecretClass ,
133130) -> Result < Box < Dynamic > , FromClassError > {
134131 Ok ( match class. spec . backend {
135- crd :: SecretClassBackend :: K8sSearch ( crd :: K8sSearchBackend {
132+ v1alpha1 :: SecretClassBackend :: K8sSearch ( v1alpha1 :: K8sSearchBackend {
136133 search_namespace,
137134 trust_store_config_map_name,
138135 } ) => from ( super :: K8sSearch {
139136 client : Unloggable ( client. clone ( ) ) ,
140137 search_namespace,
141138 trust_store_config_map_name,
142139 } ) ,
143- crd :: SecretClassBackend :: AutoTls ( crd :: AutoTlsBackend {
140+ v1alpha1 :: SecretClassBackend :: AutoTls ( v1alpha1 :: AutoTlsBackend {
144141 ca,
145142 additional_trust_roots,
146143 max_certificate_lifetime,
@@ -153,11 +150,11 @@ pub async fn from_class(
153150 )
154151 . await ?,
155152 ) ,
156- crd :: SecretClassBackend :: CertManager ( config) => from ( super :: CertManager {
153+ v1alpha1 :: SecretClassBackend :: CertManager ( config) => from ( super :: CertManager {
157154 client : Unloggable ( client. clone ( ) ) ,
158155 config,
159156 } ) ,
160- crd :: SecretClassBackend :: KerberosKeytab ( crd :: KerberosKeytabBackend {
157+ v1alpha1 :: SecretClassBackend :: KerberosKeytab ( v1alpha1 :: KerberosKeytabBackend {
161158 realm_name,
162159 kdc,
163160 admin,
@@ -185,14 +182,14 @@ pub enum FromSelectorError {
185182 #[ snafu( display( "failed to get {class}" ) ) ]
186183 GetSecretClass {
187184 source : stackable_operator:: client:: Error ,
188- class : ObjectRef < SecretClass > ,
185+ class : ObjectRef < v1alpha1 :: SecretClass > ,
189186 } ,
190187
191188 #[ snafu( display( "failed to initialize backend for {class}" ) ) ]
192189 FromClass {
193190 #[ snafu( source( from( FromClassError , Box :: new) ) ) ]
194191 source : Box < FromClassError > ,
195- class : ObjectRef < SecretClass > ,
192+ class : ObjectRef < v1alpha1 :: SecretClass > ,
196193 } ,
197194}
198195
@@ -220,7 +217,7 @@ pub async fn from_selector(
220217) -> Result < Box < Dynamic > , FromSelectorError > {
221218 let class_ref = || ObjectRef :: new ( & selector. class ) ;
222219 let class = client
223- . get :: < SecretClass > ( & selector. class , & ( ) )
220+ . get :: < v1alpha1 :: SecretClass > ( & selector. class , & ( ) )
224221 . await
225222 . with_context ( |_| from_selector_error:: GetSecretClassSnafu { class : class_ref ( ) } ) ?;
226223 from_class ( client, class)
0 commit comments