Skip to content

Commit

Permalink
introduced ANK*_INSECURE env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
lingnoi committed Jun 18, 2024
1 parent 3de50c6 commit 8dbfb96
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

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

7 changes: 6 additions & 1 deletion agent/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ pub struct Arguments {
/// An existing path where to manage the fifo files.
#[clap(short = 'r', long = "run-folder", default_value_t = DEFAULT_RUN_FOLDER.into())]
pub run_folder: String,
#[clap(short = 'k', long = "insecure", default_value_t = false)]
#[clap(
short = 'k',
long = "insecure",
env = "ANKAGENT_INSECURE",
default_value_t = false
)]
/// Flag to disable TLS communication between Ankaios agent and server.
pub insecure: bool,
#[clap(long = "ankagent_ca_pem", env)]
Expand Down
7 changes: 6 additions & 1 deletion ank/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ pub struct AnkCli {
#[clap(long = "no-wait")]
/// Do not wait for workloads to be created/deleted
pub no_wait: bool,
#[clap(short = 'k', long = "insecure", default_value_t = false)]
#[clap(
short = 'k',
long = "insecure",
env = "ANK_INSECURE",
default_value_t = false
)]
/// Flag to disable TLS communication between ank CLI and Ankaios server.
pub insecure: bool,
#[clap(long = "ank_ca_pem", env)]
Expand Down
7 changes: 6 additions & 1 deletion server/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ pub struct Arguments {
#[clap(short = 'a', long = "address", default_value_t = DEFAULT_SOCKET_ADDRESS.parse().unwrap())]
/// The address, including the port, the server shall listen at.
pub addr: SocketAddr,
#[clap(short = 'k', long = "insecure", default_value_t = false)]
#[clap(
short = 'k',
long = "insecure",
env = "ANKSERVER_INSECURE",
default_value_t = false
)]
/// Flag to disable TLS communication between Ankaios server, agent and ank CLI.
pub insecure: bool,
#[clap(long = "ankserver_ca_pem", env)]
Expand Down

0 comments on commit 8dbfb96

Please sign in to comment.