Skip to content

Commit

Permalink
feat: add optional chisel_image option to ExitNode
Browse files Browse the repository at this point in the history
  • Loading branch information
lleyton committed Dec 30, 2023
1 parent 3fc7080 commit a24d6c7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions deploy/crd/exit-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ spec:
description: Optional authentication secret name to connect to the control plane
nullable: true
type: string
chisel_image:
description: Optional value for the chisel client image used to connect to the chisel server If not provided, jpillora/chisel:latest is used
nullable: true
type: string
default_route:
default: false
description: Optional boolean value for whether to make the exit node the default route for the cluster If true, the exit node will be the default route for the cluster default value is false
Expand Down
1 change: 1 addition & 0 deletions src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ async fn exit_node_from_service(
external_host: None,
default_route: true,
fingerprint: None,
chisel_image: None,
},
status: None,
};
Expand Down
8 changes: 7 additions & 1 deletion src/deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,13 @@ pub async fn create_pod_template(
spec: Some(PodSpec {
containers: vec![Container {
args: Some(args),
image: Some("jpillora/chisel".to_string()),
image: Some(
exit_node
.spec
.chisel_image
.clone()
.unwrap_or_else(|| "jpillora/chisel".to_string()),
),
name: "chisel".to_string(),
env,
..Default::default()
Expand Down
3 changes: 3 additions & 0 deletions src/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ pub struct ExitNodeSpec {
pub fingerprint: Option<String>,
/// Optional authentication secret name to connect to the control plane
pub auth: Option<String>,
/// Optional value for the chisel client image used to connect to the chisel server
/// If not provided, jpillora/chisel:latest is used
pub chisel_image: Option<String>,
/// Optional boolean value for whether to make the exit node the default route for the cluster
/// If true, the exit node will be the default route for the cluster
/// default value is false
Expand Down

0 comments on commit a24d6c7

Please sign in to comment.