@@ -15,10 +15,7 @@ use super::{
15
15
pod_info:: { PodInfo , SchedulingPodInfo } ,
16
16
tls,
17
17
} ;
18
- use crate :: {
19
- crd:: { self , SecretClass } ,
20
- utils:: Unloggable ,
21
- } ;
18
+ use crate :: { crd:: v1alpha1, utils:: Unloggable } ;
22
19
23
20
pub struct DynError ( Box < dyn SecretBackendError > ) ;
24
21
@@ -129,18 +126,18 @@ impl SecretBackendError for FromClassError {
129
126
130
127
pub async fn from_class (
131
128
client : & stackable_operator:: client:: Client ,
132
- class : SecretClass ,
129
+ class : v1alpha1 :: SecretClass ,
133
130
) -> Result < Box < Dynamic > , FromClassError > {
134
131
Ok ( match class. spec . backend {
135
- crd :: SecretClassBackend :: K8sSearch ( crd :: K8sSearchBackend {
132
+ v1alpha1 :: SecretClassBackend :: K8sSearch ( v1alpha1 :: K8sSearchBackend {
136
133
search_namespace,
137
134
trust_store_config_map_name,
138
135
} ) => from ( super :: K8sSearch {
139
136
client : Unloggable ( client. clone ( ) ) ,
140
137
search_namespace,
141
138
trust_store_config_map_name,
142
139
} ) ,
143
- crd :: SecretClassBackend :: AutoTls ( crd :: AutoTlsBackend {
140
+ v1alpha1 :: SecretClassBackend :: AutoTls ( v1alpha1 :: AutoTlsBackend {
144
141
ca,
145
142
additional_trust_roots,
146
143
max_certificate_lifetime,
@@ -153,11 +150,11 @@ pub async fn from_class(
153
150
)
154
151
. await ?,
155
152
) ,
156
- crd :: SecretClassBackend :: CertManager ( config) => from ( super :: CertManager {
153
+ v1alpha1 :: SecretClassBackend :: CertManager ( config) => from ( super :: CertManager {
157
154
client : Unloggable ( client. clone ( ) ) ,
158
155
config,
159
156
} ) ,
160
- crd :: SecretClassBackend :: KerberosKeytab ( crd :: KerberosKeytabBackend {
157
+ v1alpha1 :: SecretClassBackend :: KerberosKeytab ( v1alpha1 :: KerberosKeytabBackend {
161
158
realm_name,
162
159
kdc,
163
160
admin,
@@ -185,14 +182,14 @@ pub enum FromSelectorError {
185
182
#[ snafu( display( "failed to get {class}" ) ) ]
186
183
GetSecretClass {
187
184
source : stackable_operator:: client:: Error ,
188
- class : ObjectRef < SecretClass > ,
185
+ class : ObjectRef < v1alpha1 :: SecretClass > ,
189
186
} ,
190
187
191
188
#[ snafu( display( "failed to initialize backend for {class}" ) ) ]
192
189
FromClass {
193
190
#[ snafu( source( from( FromClassError , Box :: new) ) ) ]
194
191
source : Box < FromClassError > ,
195
- class : ObjectRef < SecretClass > ,
192
+ class : ObjectRef < v1alpha1 :: SecretClass > ,
196
193
} ,
197
194
}
198
195
@@ -220,7 +217,7 @@ pub async fn from_selector(
220
217
) -> Result < Box < Dynamic > , FromSelectorError > {
221
218
let class_ref = || ObjectRef :: new ( & selector. class ) ;
222
219
let class = client
223
- . get :: < SecretClass > ( & selector. class , & ( ) )
220
+ . get :: < v1alpha1 :: SecretClass > ( & selector. class , & ( ) )
224
221
. await
225
222
. with_context ( |_| from_selector_error:: GetSecretClassSnafu { class : class_ref ( ) } ) ?;
226
223
from_class ( client, class)
0 commit comments