diff --git a/Cargo.lock b/Cargo.lock index 9ff3aa9bfe0..cab089525e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4180,7 +4180,7 @@ dependencies = [ [[package]] name = "mirrord-protocol" -version = "1.6.0" +version = "1.6.1" dependencies = [ "actix-codec", "bincode", diff --git a/changelog.d/2539.fixed.md b/changelog.d/2539.fixed.md new file mode 100644 index 00000000000..7422431d664 --- /dev/null +++ b/changelog.d/2539.fixed.md @@ -0,0 +1 @@ +Fix network interface configuration not propagating to agent \ No newline at end of file diff --git a/mirrord/agent/src/cli.rs b/mirrord/agent/src/cli.rs index 5d11d12b2a9..66be9c45151 100644 --- a/mirrord/agent/src/cli.rs +++ b/mirrord/agent/src/cli.rs @@ -1,7 +1,7 @@ #![deny(missing_docs)] use clap::{Parser, Subcommand}; -use mirrord_protocol::{MeshVendor, AGENT_OPERATOR_CERT_ENV}; +use mirrord_protocol::{MeshVendor, AGENT_NETWORK_INTERFACE_ENV, AGENT_OPERATOR_CERT_ENV}; const DEFAULT_RUNTIME: &str = "containerd"; @@ -23,7 +23,7 @@ pub struct Args { pub communication_timeout: u16, /// Interface to use - #[arg(short = 'i', long)] + #[arg(short = 'i', long, env = AGENT_NETWORK_INTERFACE_ENV)] pub network_interface: Option, /// Return an error after accepting the first client connection, in order to test agent error diff --git a/mirrord/kube/src/api/container/util.rs b/mirrord/kube/src/api/container/util.rs index 4151a800e73..80b4a27a6c6 100644 --- a/mirrord/kube/src/api/container/util.rs +++ b/mirrord/kube/src/api/container/util.rs @@ -4,7 +4,7 @@ use futures::{AsyncBufReadExt, TryStreamExt}; use k8s_openapi::api::core::v1::{EnvVar, Pod, Toleration}; use kube::{api::LogParams, Api}; use mirrord_config::agent::{AgentConfig, LinuxCapability}; -use mirrord_protocol::AGENT_OPERATOR_CERT_ENV; +use mirrord_protocol::{AGENT_NETWORK_INTERFACE_ENV, AGENT_OPERATOR_CERT_ENV}; use regex::Regex; use tracing::warn; @@ -56,6 +56,9 @@ pub(super) fn agent_env(agent: &AgentConfig, params: &&ContainerParams) -> Vec