diff --git a/src/watcher.rs b/src/watcher.rs index 5ab0adf..bfe0899 100644 --- a/src/watcher.rs +++ b/src/watcher.rs @@ -36,10 +36,9 @@ pub async fn watch() { } // Start the watcher - tokio::spawn({ - let api: Api = api.clone(); - - async move { + tokio::spawn(async move { + loop { + let api: Api = api.clone(); _watch(api).await; } }); @@ -47,6 +46,8 @@ pub async fn watch() { /// Start the watcher for CRD Creation/Deletion async fn _watch(api: Api) { + tracing::info!("Watching for CRD Creation/Deletion"); + if let Err(e) = watcher(api.clone(), watcher::Config::default()) .try_for_each(|r| { tracing::debug!("Event: {:?}", r);