Skip to content

Commit

Permalink
Add quickselect for impersonated container name, fix CLI env var name (
Browse files Browse the repository at this point in the history
…#185)

* Add quickselect for impersonated container name, fix CLI env var name
  • Loading branch information
camerondurham authored Jul 4, 2022
1 parent f89055b commit 8ab77c8
Show file tree
Hide file tree
Showing 8 changed files with 1,690 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
### Added
- mirrord-cli `exec` subcommand accepts `--extract-path` argument to set the directory to extract the library to. Used for tests mainly.
- mirrord-layer provides `MIRRORD_IMPERSONATED_CONTAINER_NAME` environment variable to specify container name to impersonate. mirrord-cli accepts argument to set variable.
- vscode-ext provides quick-select for setting `MIRRORD_IMPERSONATED_CONTAINER_NAME`

### Changed
- Refactor e2e, enable only Node HTTP mirroring test.
Expand Down
2 changes: 1 addition & 1 deletion mirrord-cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub(super) struct ExecArgs {

/// Select container name to impersonate. Default is first container.
#[clap(long, value_parser)]
pub impersonate_container_name: Option<String>,
pub impersonated_container_name: Option<String>,

/// Accept/reject invalid certificates.
#[clap(short = 'c', long, value_parser)]
Expand Down
4 changes: 2 additions & 2 deletions mirrord-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ fn exec(args: &ExecArgs) -> Result<()> {
std::env::set_var("MIRRORD_AGENT_NAMESPACE", namespace.clone());
}

if let Some(impersonate_container_name) = &args.impersonate_container_name {
if let Some(impersonated_container_name) = &args.impersonated_container_name {
std::env::set_var(
"MIRRORD_IMPERSONATED_CONTAINER_NAME",
impersonate_container_name,
impersonated_container_name,
);
}

Expand Down
1 change: 1 addition & 0 deletions vscode-ext/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ mirrord lets you easily mirror traffic from your Kubernetes cluster to your loca

- You can control the namespace mirrord will find pods by changing the impersonated pod namespace by clicking the settings button next to the Enable/Disable mirrord button
- You can also control in which k8s namespace the mirrord-agent will spawn using the same setting button.
- You can control which container to impersonate within the impersonated pod
Loading

0 comments on commit 8ab77c8

Please sign in to comment.