@@ -8,7 +8,7 @@ use crd::{
8
8
APP_NAME , OPERATOR_NAME , ZookeeperCluster , ZookeeperClusterVersion , ZookeeperZnode ,
9
9
ZookeeperZnodeVersion , v1alpha1,
10
10
} ;
11
- use futures:: { StreamExt , pin_mut } ;
11
+ use futures:: { FutureExt , StreamExt } ;
12
12
use stackable_operator:: {
13
13
YamlSchema ,
14
14
cli:: { Command , RunArguments } ,
@@ -92,7 +92,8 @@ async fn main() -> anyhow::Result<()> {
92
92
93
93
let eos_checker =
94
94
EndOfSupportChecker :: new ( built_info:: BUILT_TIME_UTC , maintenance. end_of_support ) ?
95
- . run ( ) ;
95
+ . run ( )
96
+ . map ( anyhow:: Ok ) ;
96
97
97
98
let product_config = product_config. load ( & [
98
99
"deploy/config-spec/properties.yaml" ,
@@ -155,7 +156,8 @@ async fn main() -> anyhow::Result<()> {
155
156
. await ;
156
157
}
157
158
} ,
158
- ) ;
159
+ )
160
+ . map ( anyhow:: Ok ) ;
159
161
160
162
let znode_controller = Controller :: new (
161
163
watch_namespace. get_api :: < DeserializeGuard < v1alpha1:: ZookeeperZnode > > ( & client) ,
@@ -218,12 +220,11 @@ async fn main() -> anyhow::Result<()> {
218
220
. await ;
219
221
}
220
222
} ,
221
- ) ;
223
+ )
224
+ . map ( anyhow:: Ok ) ;
222
225
223
- pin_mut ! ( zk_controller, znode_controller) ;
224
226
// kube-runtime's Controller will tokio::spawn each reconciliation, so this only concerns the internal watch machinery
225
- let controller_futures = futures:: future:: select ( zk_controller, znode_controller) ;
226
- tokio:: join!( controller_futures, eos_checker) ;
227
+ futures:: try_join!( zk_controller, znode_controller, eos_checker) ?;
227
228
}
228
229
}
229
230
0 commit comments