Skip to content

Commit

Permalink
Clean up some warnings, bump to 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
korewaChino committed Jan 8, 2025
1 parent dec7df7 commit 2d058de
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chisel-operator"
version = "0.4.1"
version = "0.5.0"
edition = "2021"
description = "Chisel tunnel operator for Kubernetes"
authors = [
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/aws.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{cloud_init::generate_cloud_init_config, pwgen::generate_password, Provisioner};
use super::{cloud_init::generate_cloud_init_config, Provisioner};
use crate::{
cloud::CHISEL_PORT,
ops::{parse_provisioner_label_value, ExitNode, ExitNodeStatus, EXIT_NODE_PROVISIONER_LABEL},
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/digitalocean.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{cloud_init::generate_cloud_init_config, pwgen::generate_password, Provisioner};
use super::{cloud_init::generate_cloud_init_config, Provisioner};
use crate::ops::{
parse_provisioner_label_value, ExitNode, ExitNodeStatus, EXIT_NODE_PROVISIONER_LABEL,
};
Expand Down
11 changes: 7 additions & 4 deletions src/cloud/linode.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{cloud_init::generate_cloud_init_config, pwgen::generate_password, Provisioner};
use super::{cloud_init::generate_cloud_init_config, Provisioner};
use crate::ops::{
parse_provisioner_label_value, ExitNode, ExitNodeStatus, EXIT_NODE_PROVISIONER_LABEL,
};
Expand Down Expand Up @@ -54,9 +54,9 @@ impl Provisioner for LinodeProvisioner {
&self,
auth: Secret,
exit_node: ExitNode,
node_password: String,
chisel_auth_string: String,
) -> color_eyre::Result<ExitNodeStatus> {
let config = generate_cloud_init_config(&node_password, exit_node.spec.port);
let config = generate_cloud_init_config(&chisel_auth_string, exit_node.spec.port);

// Okay, so apparently Linode uses base64 for user_data, so let's
// base64 encode the config
Expand All @@ -82,9 +82,12 @@ impl Provisioner for LinodeProvisioner {
exit_node.metadata.name.as_ref().unwrap()
);

// 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 mut instance = api
.create_instance(&self.region, &self.size)
.root_pass(&node_password)
.root_pass(root_password)
.label(&name)
.user_data(&user_data)
.tags(vec![format!("chisel-operator-provisioner:{}", provisioner)])
Expand Down
4 changes: 2 additions & 2 deletions src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ pub async fn run() -> color_eyre::Result<()> {
client: client.clone(),
}),
)
.for_each(|result_value| futures::future::ready(()))
.for_each(|_| futures::future::ready(()))
.boxed(),
);

Expand All @@ -756,7 +756,7 @@ pub async fn run() -> color_eyre::Result<()> {
error_policy_exit_node,
Arc::new(Context { client }),
)
.for_each(|result_value| futures::future::ready(()))
.for_each(|_| futures::future::ready(()))
.boxed(),
);

Expand Down

0 comments on commit 2d058de

Please sign in to comment.