diff --git a/tembo-operator/src/app_service/ingress.rs b/tembo-operator/src/app_service/ingress.rs index 27d72d71d..d6d0abd68 100644 --- a/tembo-operator/src/app_service/ingress.rs +++ b/tembo-operator/src/app_service/ingress.rs @@ -363,13 +363,19 @@ pub async fn reconcile_ingress( // Check if there are any IngressRoute objects with the label component=appService and delete them let ingress_routes = ingress_api.list(&lp).await?; for ingress_route in ingress_routes.items { - match ingress_api.delete(&ingress_route.metadata.name.unwrap(), &Default::default()).await { + match ingress_api + .delete(&ingress_route.metadata.name.unwrap(), &Default::default()) + .await + { Ok(_) => { debug!("ns: {}, successfully deleted IngressRoute: {}", ns, coredb_name); return Ok(()); } Err(e) => { - error!("ns: {}, Failed to delete IngressRoute: {}, error: {}", ns, coredb_name, e); + error!( + "ns: {}, Failed to delete IngressRoute: {}, error: {}", + ns, coredb_name, e + ); return Err(e); } } @@ -442,13 +448,22 @@ pub async fn reconcile_ingress_tcp( // Check if there are any IngressRouteTCP objects with the label component=appService and delete them let ingress_tcp_routes = ingress_api.list(&lp).await?; for ingress_tcp_route in ingress_tcp_routes.items { - match ingress_api.delete(&ingress_tcp_route.metadata.name.unwrap(), &Default::default()).await { + match ingress_api + .delete(&ingress_tcp_route.metadata.name.unwrap(), &Default::default()) + .await + { Ok(_) => { - debug!("ns: {}, successfully deleted IngressRouteTCP: {}", ns, coredb_name); + debug!( + "ns: {}, successfully deleted IngressRouteTCP: {}", + ns, coredb_name + ); return Ok(()); } Err(e) => { - error!("ns: {}, Failed to delete IngressRouteTCP: {}, error: {}", ns, coredb_name, e); + error!( + "ns: {}, Failed to delete IngressRouteTCP: {}, error: {}", + ns, coredb_name, e + ); return Err(e); } } diff --git a/tembo-operator/tests/integration_tests.rs b/tembo-operator/tests/integration_tests.rs index 695b97e68..5ee8f1e15 100644 --- a/tembo-operator/tests/integration_tests.rs +++ b/tembo-operator/tests/integration_tests.rs @@ -3399,8 +3399,9 @@ CREATE EVENT TRIGGER pgrst_watch assert_eq!(ingresses.len(), 0); // Assert IngressRouteTCP is gone - let ingresses_tcp: Vec = - list_resources(client.clone(), cdb_name, &namespace, 0).await.unwrap(); + let ingresses_tcp: Vec = list_resources(client.clone(), cdb_name, &namespace, 0) + .await + .unwrap(); assert_eq!(ingresses_tcp.len(), 0); // CLEANUP TEST