Skip to content

Commit

Permalink
Merge branch 'main' into update/rust-2025-01
Browse files Browse the repository at this point in the history
  • Loading branch information
meowjesty authored Jan 28, 2025
2 parents a4774ad + 77761d8 commit 84a26b8
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 45 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang

<!-- towncrier release notes start -->

## [3.131.1](https://github.com/metalbear-co/mirrord/tree/3.131.1) - 2025-01-28


### Changed

- mirrord commands now accept the `-f`/`--config-file` argument without the value as well.
When no value is provided, `./.mirrord/mirrord.json` is assumed.
[#1706](https://github.com/metalbear-co/mirrord/issues/1706)


### Fixed

- Added ping pong subtask to mirrord-extproxy to keep agent connection alive while it is
up. [#3030](https://github.com/metalbear-co/mirrord/issues/3030)
- `agent.privileged` no longer affects targetless agents' pods.

## [3.131.0](https://github.com/metalbear-co/mirrord/tree/3.131.0) - 2025-01-27


Expand Down
56 changes: 28 additions & 28 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
Expand Up @@ -27,7 +27,7 @@ resolver = "2"

# latest commits on rustls suppress certificate verification
[workspace.package]
version = "3.131.0"
version = "3.131.1"
edition = "2021"
license = "MIT"
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions mirrord-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
},
"disabled_capabilities": {
"title": "agent.disabled_capabilities {#agent-disabled_capabilities}",
"description": "Disables specified Linux capabilities for the agent container. If nothing is disabled here, agent uses `NET_ADMIN`, `NET_RAW`, `SYS_PTRACE` and `SYS_ADMIN`.",
"description": "Disables specified Linux capabilities for the agent container. If nothing is disabled here, agent uses `NET_ADMIN`, `NET_RAW`, `SYS_PTRACE` and `SYS_ADMIN`.\n\nHas no effect when using the targetless mode, as targetless agent containers have no capabilities.",
"type": [
"array",
"null"
Expand Down Expand Up @@ -423,7 +423,7 @@
},
"privileged": {
"title": "agent.privileged {#agent-privileged}",
"description": "Run the mirror agent as privileged container. Defaults to `false`.\n\nMight be needed in strict environments such as Bottlerocket.",
"description": "Run the mirror agent as privileged container. Defaults to `false`.\n\nMight be needed in strict environments such as Bottlerocket.\n\nHas no effect when using the targetless mode, as targetless agent containers are never privileged.",
"type": [
"boolean",
"null"
Expand Down
15 changes: 9 additions & 6 deletions mirrord/cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ pub(super) struct ExecParams {
pub disable_version_check: bool,

/// Load config from config file
#[arg(short = 'f', long, value_hint = ValueHint::FilePath)]
/// When using -f flag without a value, defaults to "./.mirrord/mirrord.json"
#[arg(short = 'f', long, value_hint = ValueHint::FilePath, default_missing_value = "./.mirrord/mirrord.json", num_args = 0..=1)]
pub config_file: Option<PathBuf>,

/// Kube context to use from Kubeconfig
Expand Down Expand Up @@ -426,7 +427,8 @@ pub(super) struct PortForwardArgs {
pub disable_version_check: bool,

/// Load config from config file
#[arg(short = 'f', long, value_hint = ValueHint::FilePath)]
/// When using -f flag without a value, defaults to "./.mirrord/mirrord.json"
#[arg(short = 'f', long, value_hint = ValueHint::FilePath, default_missing_value = "./.mirrord/mirrord.json", num_args = 0..=1)]
pub config_file: Option<PathBuf>,

/// Kube context to use from Kubeconfig
Expand Down Expand Up @@ -587,7 +589,7 @@ pub(super) enum OperatorCommand {
/// Print operator status
Status {
/// Specify config file to use
#[arg(short = 'f', long, value_hint = ValueHint::FilePath)]
#[arg(short = 'f', long, value_hint = ValueHint::FilePath, default_missing_value = "./.mirrord/mirrord.json", num_args = 0..=1)]
config_file: Option<PathBuf>,
},
/// Operator session management commands.
Expand Down Expand Up @@ -727,7 +729,7 @@ impl ListTargetArgs {
#[derive(Args, Debug)]
pub(super) struct ExtensionExecArgs {
/// Specify config file to use
#[arg(short = 'f', long, value_hint = ValueHint::FilePath)]
#[arg(short = 'f', long, value_hint = ValueHint::FilePath, default_missing_value = "./mirrord.json", num_args = 0..=1)]
pub config_file: Option<PathBuf>,
/// Specify target
#[arg(short = 't')]
Expand Down Expand Up @@ -766,7 +768,7 @@ pub(super) enum DiagnoseCommand {
/// Check network connectivity and provide RTT (latency) statistics.
Latency {
/// Specify config file to use
#[arg(short = 'f', long, value_hint = ValueHint::FilePath)]
#[arg(short = 'f', long, value_hint = ValueHint::FilePath, default_missing_value = "./.mirrord/mirrord.json", num_args = 0..=1)]
config_file: Option<PathBuf>,
},
}
Expand Down Expand Up @@ -895,7 +897,8 @@ pub(super) struct VpnArgs {
pub namespace: Option<String>,

/// Load config from config file
#[arg(short = 'f', long, value_hint = ValueHint::FilePath)]
/// When using -f flag without a value, defaults to "./.mirrord/mirrord.json"
#[arg(short = 'f', long, value_hint = ValueHint::FilePath, default_missing_value = "./.mirrord/mirrord.json", num_args = 0..=1)]
pub config_file: Option<PathBuf>,

#[cfg(target_os = "macos")]
Expand Down
4 changes: 4 additions & 0 deletions mirrord/cli/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ pub(crate) enum ExternalProxyError {
)]
#[diagnostic(help("{GENERAL_BUG}"))]
MissingTlsInfo,

#[error("External proxy ping pong with the agent failed: {0}")]
#[diagnostic(help("{GENERAL_BUG}"))]
PingPongFailed(String),
}

/// Errors that can occur when executing the `mirrord intproxy` command.
Expand Down
Loading

0 comments on commit 84a26b8

Please sign in to comment.