diff --git a/src/cloud/cloud_init.rs b/src/cloud/cloud_init.rs index da85202..55eca98 100644 --- a/src/cloud/cloud_init.rs +++ b/src/cloud/cloud_init.rs @@ -39,5 +39,7 @@ fn test_generate_cloud_init_config() { let config = generate_cloud_init_config(password, 9090); println!("{}", config); assert!(config.contains("AUTH=chisel:test")); - assert!(config.contains("ExecStart=/usr/local/bin/chisel server --port=9090 --reverse --auth chisel:test")); + assert!(config.contains( + "ExecStart=/usr/local/bin/chisel server --port=9090 --reverse --auth chisel:test" + )); } diff --git a/src/cloud/digitalocean.rs b/src/cloud/digitalocean.rs index 2ef08bf..cad9d2e 100644 --- a/src/cloud/digitalocean.rs +++ b/src/cloud/digitalocean.rs @@ -63,7 +63,6 @@ impl Provisioner for DigitalOceanProvisioner { exit_node: ExitNode, node_password: String, ) -> color_eyre::Result { - let config = generate_cloud_init_config(&node_password, exit_node.spec.port); // TODO: Secret reference, not plaintext diff --git a/src/cloud/linode.rs b/src/cloud/linode.rs index 787cb83..b0000e2 100644 --- a/src/cloud/linode.rs +++ b/src/cloud/linode.rs @@ -83,7 +83,9 @@ impl Provisioner for LinodeProvisioner { ); // Since we now directly pass in the chisel auth string with the `chisel:` prefix, let's remove the prefix - let root_password = chisel_auth_string.strip_prefix("chisel:").unwrap_or(&chisel_auth_string); + let root_password = chisel_auth_string + .strip_prefix("chisel:") + .unwrap_or(&chisel_auth_string); let mut instance = api .create_instance(&self.region, &self.size) @@ -179,7 +181,9 @@ impl Provisioner for LinodeProvisioner { Ok(status) } else { warn!("No instance status found, creating new instance"); - return self.create_exit_node(auth.clone(), exit_node, node_password).await; + return self + .create_exit_node(auth.clone(), exit_node, node_password) + .await; } } } diff --git a/src/daemon.rs b/src/daemon.rs index 7c793a1..467590c 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -633,12 +633,20 @@ async fn reconcile_nodes(obj: Arc, ctx: Arc) -> Result