Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notice that fs mapping does not apply to relative paths. #2912

Merged
merged 4 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/2894.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add notice that fs mapping does not apply to relative paths.
4 changes: 2 additions & 2 deletions mirrord-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
},
"mapping": {
"title": "feature.fs.mapping {#feature-fs-mapping}",
"description": "Specify map of patterns that if matched will replace the path according to specification.\n\n*Capture groups are allowed.*\n\nExample: ```json { \"^/home/(?<user>\\\\S+)/dev/tomcat\": \"/etc/tomcat\" \"^/home/(?<user>\\\\S+)/dev/config/(?<app>\\\\S+)\": \"/mnt/configs/${user}-$app\" } ``` Will do the next replacements for any io operaton\n\n`/home/johndoe/dev/tomcat/context.xml` => `/etc/tomcat/context.xml` `/home/johndoe/dev/config/api/app.conf` => `/mnt/configs/johndoe-api/app.conf`",
"description": "Specify map of patterns that if matched will replace the path according to specification.\n\n*Capture groups are allowed.*\n\nExample: ```json { \"^/home/(?<user>\\\\S+)/dev/tomcat\": \"/etc/tomcat\" \"^/home/(?<user>\\\\S+)/dev/config/(?<app>\\\\S+)\": \"/mnt/configs/${user}-$app\" } ``` Will do the next replacements for any io operaton\n\n`/home/johndoe/dev/tomcat/context.xml` => `/etc/tomcat/context.xml` `/home/johndoe/dev/config/api/app.conf` => `/mnt/configs/johndoe-api/app.conf`\n\n- Relative paths: this feature (currently) does not apply mappings to relative paths, e.g. `../dev`.",
"type": [
"object",
"null"
Expand Down Expand Up @@ -435,7 +435,7 @@
},
"service_account": {
"title": "agent.service_account {#agent-service_account}",
"description": "Allows setting up custom Service Account for the agent Job and Pod.\\\n\n```json { \"service_account\": \"my-service-account\" } ```",
"description": "Allows setting up custom Service Account for the agent Job and Pod.\n\n```json { \"service_account\": \"my-service-account\" } ```",
"type": [
"string",
"null"
Expand Down
33 changes: 28 additions & 5 deletions mirrord/config/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,6 @@ as targeted agent always runs on the same node as its target container.
}
```

### agent.service_account {#agent-service_account}

Allows setting up custom Service Account for the agent Job and Pod.

### agent.privileged {#agent-privileged}

Run the mirror agent as privileged container.
Expand All @@ -357,6 +353,16 @@ Default is
}
```

### agent.service_account {#agent-service_account}

Allows setting up custom Service Account for the agent Job and Pod.

```json
{
"service_account": "my-service-account"
}
```

### agent.startup_timeout {#agent-startup_timeout}

Controls how long to wait for the agent to finish initialization.
Expand Down Expand Up @@ -432,6 +438,14 @@ Defaults to `"/opt/mirrord/lib/libmirrord_layer.so"`.
mirrord Experimental features.
This shouldn't be used unless someone from MetalBear/mirrord tells you to.

### _experimental_ disable_reuseaddr {#experimental-disable_reuseaddr}

Disables the `SO_REUSEADDR` socket option on sockets that mirrord steals/mirrors.
On macOS the application can use the same address many times but then we don't steal it
correctly. This probably should be on by default but we want to gradually roll it out.
<https://github.com/metalbear-co/mirrord/issues/2819>
This option applies only on macOS.

### _experimental_ enable_exec_hooks_linux {#experimental-enable_exec_hooks_linux}

Enables exec hooks on Linux. Enable Linux hooks can fix issues when the application
Expand All @@ -444,7 +458,7 @@ Enables `getifaddrs` hook that removes IPv6 interfaces from the list returned by

### _experimental_ readlink {#experimental-readlink}

Enables the `readlink` hook.
DEPRECATED, WILL BE REMOVED

### _experimental_ tcp_ping4_mock {#experimental-tcp_ping4_mock}

Expand All @@ -454,6 +468,10 @@ Enables the `readlink` hook.

Enables trusting any certificate on macOS, useful for <https://github.com/golang/go/issues/51991#issuecomment-2059588252>

### _experimental_ use_dev_null {#experimental-use_dev_null}

Uses /dev/null for creating local fake files (should be better than using /tmp)

## external_proxy {#root-external_proxy}

Configuration for the external proxy mirrord spawns when using the `mirrord container` command.
Expand Down Expand Up @@ -770,6 +788,9 @@ Will do the next replacements for any io operaton
`/home/johndoe/dev/tomcat/context.xml` => `/etc/tomcat/context.xml`
`/home/johndoe/dev/config/api/app.conf` => `/mnt/configs/johndoe-api/app.conf`

- Relative paths: this feature (currently) does not apply mappings to relative paths, e.g.
`../dev`.

### feature.fs.mode {#feature-fs-mode}

Configuration for enabling read-only or read-write file operations.
Expand Down Expand Up @@ -1167,6 +1188,8 @@ The `remote` and `local` config for this feature are **mutually** exclusive.

#### feature.network.outgoing.filter {#feature.network.outgoing.filter}

Filters that are used to send specific traffic from either the remote pod or the local app

List of addresses/ports/subnets that should be sent through either the remote pod or local app,
depending how you set this up with either `remote` or `local`.

Expand Down
2 changes: 1 addition & 1 deletion mirrord/config/src/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ pub struct AgentConfig {

/// ### agent.service_account {#agent-service_account}
///
/// Allows setting up custom Service Account for the agent Job and Pod.\
/// Allows setting up custom Service Account for the agent Job and Pod.
///
/// ```json
/// {
Expand Down
3 changes: 3 additions & 0 deletions mirrord/config/src/feature/fs/advanced.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ pub struct FsConfig {
///
/// `/home/johndoe/dev/tomcat/context.xml` => `/etc/tomcat/context.xml`
/// `/home/johndoe/dev/config/api/app.conf` => `/mnt/configs/johndoe-api/app.conf`
///
/// - Relative paths: this feature (currently) does not apply mappings to relative paths, e.g.
/// `../dev`.
pub mapping: Option<HashMap<String, String>>,
}

Expand Down
Loading