Skip to content

Commit

Permalink
stop pretending to handle errors in reconcile_on
Browse files Browse the repository at this point in the history
Signed-off-by: clux <[email protected]>
  • Loading branch information
clux committed Oct 9, 2023
1 parent f9d3942 commit 1a0912b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions kube-runtime/src/controller/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ where
/// name: String,
/// }
/// let external_stream = watch_external_objects().map(|ext| {
/// Ok(ObjectRef::new(&format!("{}-cm", ext.name)).within(&ns))
/// ObjectRef::new(&format!("{}-cm", ext.name)).within(&ns)
/// });
///
/// Controller::new(Api::<ConfigMap>::namespaced(client, &ns), Config::default())
Expand All @@ -1125,15 +1125,14 @@ where
/// ```
#[cfg(feature = "unstable-runtime-reconcile-on")]
#[must_use]
pub fn reconcile_on(
mut self,
trigger: impl Stream<Item = Result<ObjectRef<K>, watcher::Error>> + Send + 'static,
) -> Self {
pub fn reconcile_on(mut self, trigger: impl Stream<Item = ObjectRef<K>> + Send + 'static) -> Self {
self.trigger_selector.push(
trigger
.map_ok(move |obj| ReconcileRequest {
obj_ref: obj,
reason: ReconcileReason::Unknown,
.map(move |obj| {
Ok(ReconcileRequest {
obj_ref: obj,
reason: ReconcileReason::Unknown,
})
})
.boxed(),
);
Expand Down

0 comments on commit 1a0912b

Please sign in to comment.