Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions src/lb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,39 +542,6 @@ impl LoadBalancer {
let Some(hcloud_balancer) = hcloud_balancer else {
return Ok(());
};
for service in &hcloud_balancer.services {
tracing::info!(
"Deleting service that listens for port {} from load-balancer {}",
service.listen_port,
hcloud_balancer.name,
);
hcloud::apis::load_balancers_api::delete_service(
&self.hcloud_config,
DeleteServiceParams {
id: hcloud_balancer.id,
delete_service_request: Some(DeleteServiceRequest {
listen_port: service.listen_port,
}),
},
)
.await?;
}
for target in &hcloud_balancer.targets {
if let Some(target_ip) = target.ip.clone() {
tracing::info!("Removing target {}", target_ip.ip);
hcloud::apis::load_balancers_api::remove_target(
&self.hcloud_config,
RemoveTargetParams {
id: hcloud_balancer.id,
remove_target_request: Some(RemoveTargetRequest {
ip: Some(target_ip),
..Default::default()
}),
},
)
.await?;
}
}
hcloud::apis::load_balancers_api::delete_load_balancer(
&self.hcloud_config,
DeleteLoadBalancerParams {
Expand Down
Loading