schema
stringclasses 471
values | key
stringlengths 0
203
| description
stringlengths 0
4.37k
| object
stringlengths 2
322k
|
---|---|---|---|
jscsrc.json | validateQuoteMarks | All strings require double quotes. | {"enum": ["\""]} |
jscsrc.json | validateQuoteMarks | All strings require single quotes. | {"enum": ["'"]} |
commitlintrc.json | rule | A rule | {"type": "array", "items": [{"type": "number", "enum": [0, 1, 2]}, {"type": "string", "enum": ["always", "never"]}, {}], "minItems": 2, "maxItems": 3, "additionalItems": false} |
commitlintrc.json | items | Level: 0 disables the rule. For 1 it will be considered a warning, for 2 an error | {"type": "number", "enum": [0, 1, 2]} |
commitlintrc.json | items | Applicable: always|never: never inverts the rule | {"type": "string", "enum": ["always", "never"]} |
commitlintrc.json | items | Value: the value for this rule | {} |
commitlintrc.json | extends | Resolvable ids to commitlint configurations to extend | {"oneOf": [{"type": "array", "items": {"type": "string"}}, {"type": "string"}]} |
commitlintrc.json | parserPreset | Resolvable id to conventional-changelog parser preset to import and use | {"oneOf": [{"type": "string"}, {"type": "object", "properties": {"name": {"type": "string"}, "path": {"type": "string"}, "parserOpts": {}}, "additionalProperties": false}]} |
commitlintrc.json | helpUrl | Custom URL to show upon failure | {"type": "string"} |
commitlintrc.json | formatter | Resolvable id to package, from node_modules, which formats the output | {"type": "string"} |
commitlintrc.json | rules | Rules to check against | {"type": "object", "propertyNames": {"type": "string"}, "additionalProperties": {}} |
commitlintrc.json | plugins | Resolvable ids of commitlint plugins from node_modules | {"type": "array", "items": {"type": "string"}} |
commitlintrc.json | ignores | Additional commits to ignore, defined by ignore matchers | {"type": "array", "items": {}} |
commitlintrc.json | defaultIgnores | Whether commitlint uses the default ignore rules | {"type": "boolean"} |
mirrord-schema.json | mirrord allows for a high degree of customization when it comes to which features you want to enable, and how they should function.
All of the configuration fields have a default value, so a minimal configuration would be no configuration at all.
To help you get started, here are examples of a basic configuration file, and a complete configuration file containing all fields.
### Basic `config.json` {#root-basic}
```json { "target": "pod/bear-pod", "feature": { "env": true, "fs": "read", "network": true } } ```
### Complete `config.json` {#root-complete}
Don't use this example as a starting point, it's just here to show you all the available options. ```json { "accept_invalid_certificates": false, "skip_processes": "ide-debugger", "pause": false, "target": { "path": "pod/bear-pod", "namespace": "default" }, "connect_tcp": null, "agent": { "log_level": "info", "namespace": "default", "image": "ghcr.io/metalbear-co/mirrord:latest", "image_pull_policy": "IfNotPresent", "image_pull_secrets": [ { "secret-key": "secret" } ], "ttl": 30, "ephemeral": false, "communication_timeout": 30, "startup_timeout": 360, "network_interface": "eth0", "flush_connections": true }, "feature": { "env": { "include": "DATABASE_USER;PUBLIC_ENV", "exclude": "DATABASE_PASSWORD;SECRET_ENV", "override": { "DATABASE_CONNECTION": "db://localhost:7777/my-db", "LOCAL_BEAR": "panda" } }, "fs": { "mode": "write", "read_write": ".+\.json" , "read_only": [ ".+\.yaml", ".+important-file\.txt" ], "local": [ ".+\.js", ".+\.mjs" ] }, "network": { "incoming": { "mode": "steal", "http_header_filter": { "filter": "host: api\..+", "ports": [80, 8080] }, "port_mapping": [[ 7777, 8888 ]], "ignore_localhost": false, "ignore_ports": [9999, 10000] }, "outgoing": { "tcp": true, "udp": true, "filter": { "local": ["tcp://1.1.1.0/24:1337", "1.1.5.0/24", "google.com", ":53"] }, "ignore_localhost": false, "unix_streams": "bear.+" }, "dns": false }, }, "operator": true, "kubeconfig": "~/.kube/config", "sip_binaries": "bash", "telemetry": true, "kube_context": "my-cluster" } ```
# Options {#root-options} | {"$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": {"accept_invalid_certificates": {"type": ["boolean", "null"]}, "agent": {"anyOf": [{}, {"type": "null"}]}, "connect_agent_name": {"type": ["string", "null"]}, "connect_agent_port": {"type": ["integer", "null"], "format": "uint16", "minimum": 0.0}, "connect_tcp": {"type": ["string", "null"]}, "feature": {"anyOf": [{}, {"type": "null"}]}, "internal_proxy": {"anyOf": [{}, {"type": "null"}]}, "kube_context": {"type": ["string", "null"]}, "kubeconfig": {"type": ["string", "null"]}, "operator": {"type": ["boolean", "null"]}, "pause": {"type": ["boolean", "null"]}, "sip_binaries": {"anyOf": [{}, {"type": "null"}]}, "skip_build_tools": {"type": ["boolean", "null"]}, "skip_processes": {"anyOf": [{}, {"type": "null"}]}, "target": {"anyOf": [{}, {"type": "null"}]}, "telemetry": {"type": ["boolean", "null"]}}, "additionalProperties": false, "definitions": {"AdvancedFsUserConfig": {"type": "object", "properties": {"local": {"anyOf": [{}, {"type": "null"}]}, "mode": {"anyOf": [{}, {"type": "null"}]}, "not_found": {"anyOf": [{}, {"type": "null"}]}, "read_only": {"anyOf": [{}, {"type": "null"}]}, "read_write": {"anyOf": [{}, {"type": "null"}]}}, "additionalProperties": false}, "AgentFileConfig": {"type": "object", "properties": {"check_out_of_pods": {"type": ["boolean", "null"]}, "communication_timeout": {"type": ["integer", "null"], "format": "uint16", "minimum": 0.0}, "disabled_capabilities": {"type": ["array", "null"], "items": {}}, "ephemeral": {"type": ["boolean", "null"]}, "flush_connections": {"type": ["boolean", "null"]}, "image": {"type": ["string", "null"]}, "image_pull_policy": {"type": ["string", "null"]}, "image_pull_secrets": {"type": ["array", "null"], "items": {"type": "object", "additionalProperties": {"type": "string"}}}, "log_level": {"type": ["string", "null"]}, "namespace": {"type": ["string", "null"]}, "network_interface": {"type": ["string", "null"]}, "privileged": {"type": ["boolean", "null"]}, "startup_timeout": {"type": ["integer", "null"], "format": "uint64", "minimum": 0.0}, "tolerations": {"type": ["array", "null"], "items": {}}, "ttl": {"type": ["integer", "null"], "format": "uint16", "minimum": 0.0}}, "additionalProperties": false}, "ConcurrentSteal": {"oneOf": [{"type": "string", "enum": ["override"]}, {"type": "string", "enum": ["continue"]}, {"type": "string", "enum": ["abort"]}]}, "DeploymentTarget": {"type": "object", "required": ["deployment"], "properties": {"container": {"type": ["string", "null"]}, "deployment": {"type": "string"}}}, "EnvFileConfig": {"type": "object", "properties": {"exclude": {"anyOf": [{}, {"type": "null"}]}, "include": {"anyOf": [{}, {"type": "null"}]}, "override": {"type": ["object", "null"], "additionalProperties": {"type": "string"}}}, "additionalProperties": false}, "FeatureFileConfig": {"type": "object", "properties": {"env": {"anyOf": [{}, {"type": "null"}]}, "fs": {"anyOf": [{}, {"type": "null"}]}, "network": {"anyOf": [{}, {"type": "null"}]}}, "additionalProperties": false}, "FsModeConfig": {"oneOf": [{"type": "string", "enum": ["local"]}, {"type": "string", "enum": ["localwithoverrides"]}, {"type": "string", "enum": ["read"]}, {"type": "string", "enum": ["write"]}]}, "FsUserConfig": {"anyOf": [{"allOf": [{}]}, {"allOf": [{}]}]}, "HttpFilterFileConfig": {"type": "object", "properties": {"header_filter": {"type": ["string", "null"]}, "path_filter": {"type": ["string", "null"]}, "ports": {"anyOf": [{}, {"type": "null"}]}}, "additionalProperties": false}, "HttpHeaderFilterFileConfig": {"type": "object", "properties": {"filter": {"type": ["string", "null"]}, "ports": {"anyOf": [{}, {"type": "null"}]}}, "additionalProperties": false}, "IncomingAdvancedFileConfig": {"type": "object", "properties": {"http_filter": {"anyOf": [{}, {"type": "null"}]}, "http_header_filter": {"anyOf": [{}, {"type": "null"}]}, "ignore_localhost": {"type": ["boolean", "null"]}, "ignore_ports": {"type": ["array", "null"], "items": {"type": "integer", "format": "uint16", "minimum": 0.0}}, "listen_ports": {"type": ["array", "null"], "items": {"type": "array", "items": [{"type": "integer", "format": "uint16", "minimum": 0.0}, {"type": "integer", "format": "uint16", "minimum": 0.0}], "maxItems": 2, "minItems": 2}}, "mode": {"anyOf": [{}, {"type": "null"}]}, "on_concurrent_steal": {"anyOf": [{}, {"type": "null"}]}, "port_mapping": {"type": ["array", "null"], "items": {"type": "array", "items": [{"type": "integer", "format": "uint16", "minimum": 0.0}, {"type": "integer", "format": "uint16", "minimum": 0.0}], "maxItems": 2, "minItems": 2}}}}, "IncomingFileConfig": {"anyOf": [{"anyOf": [{}, {"type": "null"}]}, {}]}, "IncomingMode": {"oneOf": [{"type": "string", "enum": ["mirror"]}, {"type": "string", "enum": ["steal"]}, {"type": "string", "enum": ["off"]}]}, "InternalProxyFileConfig": {"type": "object", "properties": {"idle_timeout": {"type": ["integer", "null"], "format": "uint64", "minimum": 0.0}, "start_idle_timeout": {"type": ["integer", "null"], "format": "uint64", "minimum": 0.0}}, "additionalProperties": false}, "LinuxCapability": {"type": "string", "enum": ["SYS_ADMIN", "SYS_PTRACE", "NET_RAW", "NET_ADMIN"]}, "NetworkFileConfig": {"type": "object", "properties": {"dns": {"type": ["boolean", "null"]}, "incoming": {"anyOf": [{}, {"type": "null"}]}, "outgoing": {"anyOf": [{}, {"type": "null"}]}}, "additionalProperties": false}, "OutgoingFileConfig": {"type": "object", "properties": {"filter": {"anyOf": [{}, {"type": "null"}]}, "ignore_localhost": {"type": ["boolean", "null"]}, "tcp": {"type": ["boolean", "null"]}, "udp": {"type": ["boolean", "null"]}, "unix_streams": {"anyOf": [{}, {"type": "null"}]}}, "additionalProperties": false}, "OutgoingFilterConfig": {"oneOf": [{"type": "object", "required": ["remote"], "properties": {"remote": {}}, "additionalProperties": false}, {"type": "object", "required": ["local"], "properties": {"local": {}}, "additionalProperties": false}]}, "PodTarget": {"type": "object", "required": ["pod"], "properties": {"container": {"type": ["string", "null"]}, "pod": {"type": "string"}}}, "PortList": {"allOf": [{}]}, "RolloutTarget": {"type": "object", "required": ["rollout"], "properties": {"container": {"type": ["string", "null"]}, "rollout": {"type": "string"}}}, "Target": {"anyOf": [{"allOf": [{}]}, {"allOf": [{}]}, {"allOf": [{}]}]}, "TargetFileConfig": {"anyOf": [{"anyOf": [{}, {"type": "null"}]}, {"type": "object", "properties": {"namespace": {"type": ["string", "null"]}, "path": {"default": null, "anyOf": [{}, {"type": "null"}]}}}]}, "ToggleableConfig_for_EnvFileConfig": {"anyOf": [{"type": "boolean"}, {}]}, "ToggleableConfig_for_FsUserConfig": {"anyOf": [{"type": "boolean"}, {}]}, "ToggleableConfig_for_HttpFilterFileConfig": {"anyOf": [{"type": "boolean"}, {}]}, "ToggleableConfig_for_HttpHeaderFilterFileConfig": {"anyOf": [{"type": "boolean"}, {}]}, "ToggleableConfig_for_IncomingFileConfig": {"anyOf": [{"type": "boolean"}, {}]}, "ToggleableConfig_for_NetworkFileConfig": {"anyOf": [{"type": "boolean"}, {}]}, "ToggleableConfig_for_OutgoingFileConfig": {"anyOf": [{"type": "boolean"}, {}]}, "VecOrSingle_for_String": {"anyOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}]}, "VecOrSingle_for_uint16": {"anyOf": [{"type": "integer", "format": "uint16", "minimum": 0.0}, {"type": "array", "items": {"type": "integer", "format": "uint16", "minimum": 0.0}}]}, "io.k8s.api.core.v1.Toleration": {"type": "object", "properties": {"effect": {"type": "string"}, "key": {"type": "string"}, "operator": {"type": "string"}, "tolerationSeconds": {"type": "integer", "format": "int64"}, "value": {"type": "string"}}}}} |
|
mirrord-schema.json | accept_invalid_certificates | Controls whether or not mirrord accepts invalid TLS certificates (e.g. self-signed certificates).
Defaults to `false`. | {"type": ["boolean", "null"]} |
mirrord-schema.json | connect_agent_name | <!--${internal}-->
## connect_agent_name {#root-connect_agent_name}
Agent name that already exists that we can connect to.
Keep in mind that the intention here is to allow reusing a long living mirrord-agent pod, and **not** to connect multiple (simultaneos) mirrord instances to a single mirrord-agent, as the later is not properly supported without the use of [mirrord-operator](https://metalbear.co/#waitlist-form).
```json { "connect_agent_name": "mirrord-agent-still-alive" } ``` | {"type": ["string", "null"]} |
mirrord-schema.json | connect_agent_port | <!--${internal}-->
## connect_agent_port {#root-connect_agent_port}
Agent listen port that already exists that we can connect to.
```json { "connect_agent_port": "8888" } ``` | {"type": ["integer", "null"], "format": "uint16", "minimum": 0.0} |
mirrord-schema.json | connect_tcp | IP:PORT to connect to instead of using k8s api, for testing purposes.
```json { "connect_tcp": "10.10.0.100:7777" } ``` | {"type": ["string", "null"]} |
mirrord-schema.json | kube_context | Kube context to use from the kubeconfig file. Will use current context if not specified.
```json { "kube_context": "mycluster" } ``` | {"type": ["string", "null"]} |
mirrord-schema.json | kubeconfig | Path to a kubeconfig file, if not specified, will use `KUBECONFIG`, or `~/.kube/config`, or the in-cluster config.
```json { "kubeconfig": "~/bear/kube-config" } ``` | {"type": ["string", "null"]} |
mirrord-schema.json | operator | Allow to lookup if operator is installed on cluster and use it.
Defaults to `true`. | {"type": ["boolean", "null"]} |
mirrord-schema.json | pause | Controls target pause feature. Unstable.
With this feature enabled, the remote container is paused while this layer is connected to the agent.
Defaults to `false`. | {"type": ["boolean", "null"]} |
mirrord-schema.json | sip_binaries | Binaries to patch (macOS SIP).
Use this when mirrord isn't loaded to protected binaries that weren't automatically patched.
Runs `endswith` on the binary path (so `bash` would apply to any binary ending with `bash` while `/usr/bin/bash` would apply only for that binary).
```json { "sip_binaries": "bash;python" } ``` | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | skip_build_tools | Allows mirrord to skip build tools. Useful when running command lines that build and run the application in a single command.
Defaults to `true`.
Build-Tools: `["as", "cc", "ld", "go", "air", "asm", "cc1", "cgo", "dlv", "gcc", "git", "link", "math", "cargo", "hpack", "rustc", "compile", "collect2", "cargo-watch", "debugserver"]` | {"type": ["boolean", "null"]} |
mirrord-schema.json | skip_processes | Allows mirrord to skip unwanted processes.
Useful when process A spawns process B, and the user wants mirrord to operate only on process B. Accepts a single value, or multiple values separated by `;`.
```json { "skip_processes": "bash;node" } ``` | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | telemetry | Controls whether or not mirrord sends telemetry data to MetalBear cloud. Telemetry sent doesn't contain personal identifiers or any data that should be considered sensitive. It is used to improve the product. [For more information](https://github.com/metalbear-co/mirrord/blob/main/TELEMETRY.md) | {"type": ["boolean", "null"]} |
mirrord-schema.json | AdvancedFsUserConfig | Allows the user to specify the default behavior for file operations:
1. `"read"` - Read from the remote file system (default) 2. `"write"` - Read/Write from the remote file system. 3. `"local"` - Read from the local file system. 5. `"disable"` - Disable file operations.
Besides the default behavior, the user can specify behavior for specific regex patterns. Case insensitive.
1. `"read_write"` - List of patterns that should be read/write remotely. 2. `"read_only"` - List of patterns that should be read only remotely. 3. `"local"` - List of patterns that should be read locally. 4. `"not_found"` - List of patters that should never be read nor written. These files should be treated as non-existent.
The logic for choosing the behavior is as follows:
1. Check if one of the patterns match the file path, do the corresponding action. There's no specified order if two lists match the same path, we will use the first one (and we do not guarantee what is first).
**Warning**: Specifying the same path in two lists is unsupported and can lead to undefined behaviour.
2. Check our "special list" - we have an internal at compile time list for different behavior based on patterns to provide better UX.
3. If none of the above match, use the default behavior (mode).
For more information, check the file operations [technical reference](https://mirrord.dev/docs/reference/fileops/).
```json { "feature": { "fs": { "mode": "write", "read_write": ".+\.json" , "read_only": [ ".+\.yaml", ".+important-file\.txt" ], "local": [ ".+\.js", ".+\.mjs" ], "not_found": [ "\.config/gcloud" ] } } } ``` | {"type": "object", "properties": {"local": {"anyOf": [{}, {"type": "null"}]}, "mode": {"anyOf": [{}, {"type": "null"}]}, "not_found": {"anyOf": [{}, {"type": "null"}]}, "read_only": {"anyOf": [{}, {"type": "null"}]}, "read_write": {"anyOf": [{}, {"type": "null"}]}}, "additionalProperties": false} |
mirrord-schema.json | local | Specify file path patterns that if matched will be opened locally. | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | not_found | Specify file path patterns that if matched will be treated as non-existent. | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | read_only | Specify file path patterns that if matched will be read from the remote. if file matching the pattern is opened for writing or read/write it will be opened locally. | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | read_write | Specify file path patterns that if matched will be read and written to the remote. | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | AgentFileConfig | Configuration for the mirrord-agent pod that is spawned in the Kubernetes cluster.
We provide sane defaults for this option, so you don't have to set up anything here.
```json { "agent": { "log_level": "info", "namespace": "default", "image": "ghcr.io/metalbear-co/mirrord:latest", "image_pull_policy": "IfNotPresent", "image_pull_secrets": [ { "secret-key": "secret" } ], "ttl": 30, "ephemeral": false, "communication_timeout": 30, "startup_timeout": 360, "network_interface": "eth0", "pause": false, "flush_connections": false, } } ``` | {"type": "object", "properties": {"check_out_of_pods": {"type": ["boolean", "null"]}, "communication_timeout": {"type": ["integer", "null"], "format": "uint16", "minimum": 0.0}, "disabled_capabilities": {"type": ["array", "null"], "items": {}}, "ephemeral": {"type": ["boolean", "null"]}, "flush_connections": {"type": ["boolean", "null"]}, "image": {"type": ["string", "null"]}, "image_pull_policy": {"type": ["string", "null"]}, "image_pull_secrets": {"type": ["array", "null"], "items": {"type": "object", "additionalProperties": {"type": "string"}}}, "log_level": {"type": ["string", "null"]}, "namespace": {"type": ["string", "null"]}, "network_interface": {"type": ["string", "null"]}, "privileged": {"type": ["boolean", "null"]}, "startup_timeout": {"type": ["integer", "null"], "format": "uint64", "minimum": 0.0}, "tolerations": {"type": ["array", "null"], "items": {}}, "ttl": {"type": ["integer", "null"], "format": "uint16", "minimum": 0.0}}, "additionalProperties": false} |
mirrord-schema.json | check_out_of_pods | Determine if to check whether there is room for agent job in target node. (Not applicable when using ephemeral containers feature)
Can be disabled if the check takes too long and you are sure there is enough resources on each node | {"type": ["boolean", "null"]} |
mirrord-schema.json | communication_timeout | Controls how long the agent lives when there are no connections.
Each connection has its own heartbeat mechanism, so even if the local application has no messages, the agent stays alive until there are no more heartbeat messages. | {"type": ["integer", "null"], "format": "uint16", "minimum": 0.0} |
mirrord-schema.json | disabled_capabilities | Disables specified Linux capabilities for the agent container. If nothing is disabled here, agent uses `NET_ADMIN`, `NET_RAW`, `SYS_PTRACE` and `SYS_ADMIN`. | {"type": ["array", "null"], "items": {}} |
mirrord-schema.json | ephemeral | Runs the agent as an [ephemeral container](https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/)
Defaults to `false`. | {"type": ["boolean", "null"]} |
mirrord-schema.json | flush_connections | Flushes existing connections when starting to steal, might fix issues where connections aren't stolen (due to being already established)
Defaults to `true`. | {"type": ["boolean", "null"]} |
mirrord-schema.json | image | Name of the agent's docker image.
Useful when a custom build of mirrord-agent is required, or when using an internal registry.
Defaults to the latest stable image `"ghcr.io/metalbear-co/mirrord:latest"`.
```json { "agent": { "image": "internal.repo/images/mirrord:latest" } } ``` | {"type": ["string", "null"]} |
mirrord-schema.json | image_pull_policy | Controls when a new agent image is downloaded.
Supports `"IfNotPresent"`, `"Always"`, `"Never"`, or any valid kubernetes [image pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy)
Defaults to `"IfNotPresent"` | {"type": ["string", "null"]} |
mirrord-schema.json | image_pull_secrets | List of secrets the agent pod has access to.
Takes an array of hash with the format `{ name: <secret-name> }`.
Read more [here](https://kubernetes.io/docs/concepts/containers/images/).
```json { "agent": { "image_pull_secrets": [ { "very-secret": "secret-key" }, { "very-secret": "keep-your-secrets" } ] } } ``` | {"type": ["array", "null"], "items": {"type": "object", "additionalProperties": {"type": "string"}}} |
mirrord-schema.json | log_level | Log level for the agent.
Supports `"trace"`, `"debug"`, `"info"`, `"warn"`, `"error"`, or any string that would work with `RUST_LOG`.
```json { "agent": { "log_level": "mirrord=debug,warn" } } ``` | {"type": ["string", "null"]} |
mirrord-schema.json | namespace | Namespace where the agent shall live.
Defaults to the current kubernetes namespace. | {"type": ["string", "null"]} |
mirrord-schema.json | network_interface | Which network interface to use for mirroring.
The default behavior is try to access the internet and use that interface. If that fails it uses `eth0`. | {"type": ["string", "null"]} |
mirrord-schema.json | privileged | Run the mirror agent as privileged container. Defaults to `false`.
Might be needed in strict environments such as Bottlerocket. | {"type": ["boolean", "null"]} |
mirrord-schema.json | startup_timeout | Controls how long to wait for the agent to finish initialization.
If initialization takes longer than this value, mirrord exits.
Defaults to `60`. | {"type": ["integer", "null"], "format": "uint64", "minimum": 0.0} |
mirrord-schema.json | tolerations | Set pod tolerations. (not with ephemeral agents) Default is ```json [ { "operator": "Exists" } ] ```
Set to an empty array to have no tolerations at all | {"type": ["array", "null"], "items": {}} |
mirrord-schema.json | ttl | Controls how long the agent pod persists for after the agent exits (in seconds).
Can be useful for collecting logs.
Defaults to `1`. | {"type": ["integer", "null"], "format": "uint16", "minimum": 0.0} |
mirrord-schema.json | ConcurrentSteal | (Operator Only): Allows overriding port locks
Can be set to either `"continue"` or `"override"`.
- `"continue"`: Continue with normal execution - `"override"`: If port lock detected then override it with new lock and force close the original locking connection. | {"oneOf": [{"type": "string", "enum": ["override"]}, {"type": "string", "enum": ["continue"]}, {"type": "string", "enum": ["abort"]}]} |
mirrord-schema.json | ConcurrentSteal | <!--${internal}--> ### override
Override any port lock and force close the original lock connection | {"type": "string", "enum": ["override"]} |
mirrord-schema.json | ConcurrentSteal | <!--${internal}--> ### continue
Continue with normal execution | {"type": "string", "enum": ["continue"]} |
mirrord-schema.json | ConcurrentSteal | <!--${internal}--> ### abort
Abort Execution when trying to steal traffic from a target whose traffic is already being stolen. | {"type": "string", "enum": ["abort"]} |
mirrord-schema.json | DeploymentTarget | <!--${internal}--> Mirror the deployment specified by [`DeploymentTarget::deployment`]. | {"type": "object", "required": ["deployment"], "properties": {"container": {"type": ["string", "null"]}, "deployment": {"type": "string"}}} |
mirrord-schema.json | deployment | <!--${internal}--> Deployment to mirror. | {"type": "string"} |
mirrord-schema.json | EnvFileConfig | Allows the user to set or override the local process' environment variables with the ones from the remote pod.
Which environment variables to load from the remote pod are controlled by setting either [`include`](#feature-env-include) or [`exclude`](#feature-env-exclude).
See the environment variables [reference](https://mirrord.dev/docs/reference/env/) for more details.
```json { "feature": { "env": { "include": "DATABASE_USER;PUBLIC_ENV", "exclude": "DATABASE_PASSWORD;SECRET_ENV", "override": { "DATABASE_CONNECTION": "db://localhost:7777/my-db", "LOCAL_BEAR": "panda" } } } } ``` | {"type": "object", "properties": {"exclude": {"anyOf": [{}, {"type": "null"}]}, "include": {"anyOf": [{}, {"type": "null"}]}, "override": {"type": ["object", "null"], "additionalProperties": {"type": "string"}}}, "additionalProperties": false} |
mirrord-schema.json | exclude | Include the remote environment variables in the local process that are **NOT** specified by this option.
Some of the variables that are excluded by default: `PATH`, `HOME`, `HOMEPATH`, `CLASSPATH`, `JAVA_EXE`, `JAVA_HOME`, `PYTHONPATH`.
Value is a list separated by ";". | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | include | Include only these remote environment variables in the local process.
Value is a list separated by ";".
Some environment variables are excluded by default (`PATH` for example), including these requires specifying them with `include` | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | override | Allows setting or overriding environment variables (locally) with a custom value.
For example, if the remote pod has an environment variable `REGION=1`, but this is an undesirable value, it's possible to use `override` to set `REGION=2` (locally) instead. | {"type": ["object", "null"], "additionalProperties": {"type": "string"}} |
mirrord-schema.json | FeatureFileConfig | Controls mirrord features.
See the [technical reference, Technical Reference](https://mirrord.dev/docs/reference/) to learn more about what each feature does.
The [`env`](#feature-env), [`fs`](#feature-fs) and [`network`](#feature-network) options have support for a shortened version, that you can see [here](#root-shortened).
```json { "feature": { "env": { "include": "DATABASE_USER;PUBLIC_ENV", "exclude": "DATABASE_PASSWORD;SECRET_ENV", "override": { "DATABASE_CONNECTION": "db://localhost:7777/my-db", "LOCAL_BEAR": "panda" } }, "fs": { "mode": "write", "read_write": ".+\.json" , "read_only": [ ".+\.yaml", ".+important-file\.txt" ], "local": [ ".+\.js", ".+\.mjs" ] }, "network": { "incoming": { "mode": "steal", "http_header_filter": { "filter": "host: api\..+", "ports": [80, 8080] }, "port_mapping": [[ 7777, 8888 ]], "ignore_localhost": false, "ignore_ports": [9999, 10000] }, "outgoing": { "tcp": true, "udp": true, "filter": { "local": ["tcp://1.1.1.0/24:1337", "1.1.5.0/24", "google.com", ":53"] }, "ignore_localhost": false, "unix_streams": "bear.+" }, "dns": false }, } } ``` | {"type": "object", "properties": {"env": {"anyOf": [{}, {"type": "null"}]}, "fs": {"anyOf": [{}, {"type": "null"}]}, "network": {"anyOf": [{}, {"type": "null"}]}}, "additionalProperties": false} |
mirrord-schema.json | FsModeConfig | Configuration for enabling read-only or read-write file operations.
These options are overriden by user specified overrides and mirrord default overrides.
If you set [`"localwithoverrides"`](#feature-fs-mode-localwithoverrides) then some files can be read/write remotely based on our default/user specified. Default option for general file configuration.
The accepted values are: `"local"`, `"localwithoverrides`, `"read"`, or `"write`. | {"oneOf": [{"type": "string", "enum": ["local"]}, {"type": "string", "enum": ["localwithoverrides"]}, {"type": "string", "enum": ["read"]}, {"type": "string", "enum": ["write"]}]} |
mirrord-schema.json | FsModeConfig | mirrord won't do anything fs-related, all operations will be local. | {"type": "string", "enum": ["local"]} |
mirrord-schema.json | FsModeConfig | mirrord will run overrides on some file operations, but most will be local. | {"type": "string", "enum": ["localwithoverrides"]} |
mirrord-schema.json | FsModeConfig | mirrord will read files from the remote, but won't write to them. | {"type": "string", "enum": ["read"]} |
mirrord-schema.json | FsModeConfig | mirrord will read/write from the remote. | {"type": "string", "enum": ["write"]} |
mirrord-schema.json | FsUserConfig | Changes file operations behavior based on user configuration.
See the file operations [reference](https://mirrord.dev/docs/reference/fileops/) for more details, and [fs advanced](#fs-advanced) for more information on how to fully setup mirrord file operations.
### Minimal `fs` config {#fs-minimal}
```json { "feature": { "fs": "read" } } ```
### Advanced `fs` config {#fs-advanced}
```json { "feature": { "fs": { "mode": "write", "read_write": ".+\.json" , "read_only": [ ".+\.yaml", ".+important-file\.txt" ], "local": [ ".+\.js", ".+\.mjs" ] } } } ``` | {"anyOf": [{"allOf": [{}]}, {"allOf": [{}]}]} |
mirrord-schema.json | FsUserConfig | <!--${internal}--> Basic configuration that controls the env vars `MIRRORD_FILE_OPS` and `MIRRORD_FILE_RO_OPS` (default). | {"allOf": [{}]} |
mirrord-schema.json | FsUserConfig | <!--${internal}--> Allows the user to specify both [`FsModeConfig`] (as above), and configuration for the overrides. | {"allOf": [{}]} |
mirrord-schema.json | HttpFilterFileConfig | Filter configuration for the HTTP traffic stealer feature.
Allows the user to set a filter (regex) for the HTTP headers, so that the stealer traffic feature only captures HTTP requests that match the specified filter, forwarding unmatched requests to their original destinations.
Only does something when [`feature.network.incoming.mode`](#feature-network-incoming-mode) is set as `"steal"`, ignored otherwise.
for example, to filter based on header: ```json { "header_filter": "host: api\..+", } ```
for example, to filter based on path ```json { "path_filter": "host: api\..+", } ``` | {"type": "object", "properties": {"header_filter": {"type": ["string", "null"]}, "path_filter": {"type": ["string", "null"]}, "ports": {"anyOf": [{}, {"type": "null"}]}}, "additionalProperties": false} |
mirrord-schema.json | header_filter | Supports regexes validated by the [`fancy-regex`](https://docs.rs/fancy-regex/latest/fancy_regex/) crate.
The HTTP traffic feature converts the HTTP headers to `HeaderKey: HeaderValue`, case-insensitive. | {"type": ["string", "null"]} |
mirrord-schema.json | path_filter | Supports regexes validated by the [`fancy-regex`](https://docs.rs/fancy-regex/latest/fancy_regex/) crate.
Case insensitive. | {"type": ["string", "null"]} |
mirrord-schema.json | ports | Activate the HTTP traffic filter only for these ports.
Other ports will still be stolen (when `"steal`" is being used), they're just not checked for HTTP filtering. | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | HttpHeaderFilterFileConfig | Filter configuration for the HTTP traffic stealer feature.
DEPRECATED - USE http_filter instead, unless using old operator/agent version (pre 3.46.0) Allows the user to set a filter (regex) for the HTTP headers, so that the stealer traffic feature only captures HTTP requests that match the specified filter, forwarding unmatched requests to their original destinations.
Only does something when [`feature.network.incoming.mode`](#feature-network-incoming-mode) is set as `"steal"`, ignored otherwise.
```json { "filter": "host: api\..+", "ports": [80, 8080] } ``` | {"type": "object", "properties": {"filter": {"type": ["string", "null"]}, "ports": {"anyOf": [{}, {"type": "null"}]}}, "additionalProperties": false} |
mirrord-schema.json | filter | Supports regexes validated by the [`fancy-regex`](https://docs.rs/fancy-regex/latest/fancy_regex/) crate.
The HTTP traffic feature converts the HTTP headers to `HeaderKey: HeaderValue`, case-insensitive. | {"type": ["string", "null"]} |
mirrord-schema.json | ports | Activate the HTTP traffic filter only for these ports.
Other ports will still be stolen (when `"steal`" is being used), they're just not checked for HTTP filtering. | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | IncomingAdvancedFileConfig | Advanced user configuration for network incoming traffic. | {"type": "object", "properties": {"http_filter": {"anyOf": [{}, {"type": "null"}]}, "http_header_filter": {"anyOf": [{}, {"type": "null"}]}, "ignore_localhost": {"type": ["boolean", "null"]}, "ignore_ports": {"type": ["array", "null"], "items": {"type": "integer", "format": "uint16", "minimum": 0.0}}, "listen_ports": {"type": ["array", "null"], "items": {"type": "array", "items": [{"type": "integer", "format": "uint16", "minimum": 0.0}, {"type": "integer", "format": "uint16", "minimum": 0.0}], "maxItems": 2, "minItems": 2}}, "mode": {"anyOf": [{}, {"type": "null"}]}, "on_concurrent_steal": {"anyOf": [{}, {"type": "null"}]}, "port_mapping": {"type": ["array", "null"], "items": {"type": "array", "items": [{"type": "integer", "format": "uint16", "minimum": 0.0}, {"type": "integer", "format": "uint16", "minimum": 0.0}], "maxItems": 2, "minItems": 2}}}} |
mirrord-schema.json | http_filter | Sets up the HTTP traffic filter (currently, only useful when `incoming: steal`).
See [`filter`](##filter) for details. | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | http_header_filter | Sets up the HTTP traffic filter (currently, only useful when `incoming: steal`).
See [`filter`](##filter) for details. | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | ignore_localhost | Consider removing when adding https://github.com/metalbear-co/mirrord/issues/702 | {"type": ["boolean", "null"]} |
mirrord-schema.json | ignore_ports | Ports to ignore when mirroring/stealing traffic. Useful if you want specific ports to be used locally only. | {"type": ["array", "null"], "items": {"type": "integer", "format": "uint16", "minimum": 0.0}} |
mirrord-schema.json | listen_ports | Mapping for local ports to actually used local ports. When application listens on a port while steal/mirror is active we fallback to random ports to avoid port conflicts. Using this configuration will always use the specified port. If this configuration doesn't exist, mirrord will try to listen on the original port and if it fails it will assign a random port
This is useful when you want to access ports exposed by your service locally For example, if you have a service that listens on port `80` and you want to access it, you probably can't listen on `80` without sudo, so you can use `[[80, 4480]]` then access it on `4480` while getting traffic from remote `80`. The value of `port_mapping` doesn't affect this. | {"type": ["array", "null"], "items": {"type": "array", "items": [{"type": "integer", "format": "uint16", "minimum": 0.0}, {"type": "integer", "format": "uint16", "minimum": 0.0}], "maxItems": 2, "minItems": 2}} |
mirrord-schema.json | mode | Allows selecting between mirrorring or stealing traffic.
See [`mode`](##mode (incoming)) for details. | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | on_concurrent_steal | (Operator Only): if value of override will force close any other connections on requested target | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | port_mapping | Mapping for local ports to remote ports.
This is useful when you want to mirror/steal a port to a different port on the remote machine. For example, your local process listens on port `9333` and the container listens on port `80`. You'd use `[[9333, 80]]` | {"type": ["array", "null"], "items": {"type": "array", "items": [{"type": "integer", "format": "uint16", "minimum": 0.0}, {"type": "integer", "format": "uint16", "minimum": 0.0}], "maxItems": 2, "minItems": 2}} |
mirrord-schema.json | IncomingFileConfig | Controls the incoming TCP traffic feature.
See the incoming [reference](https://mirrord.dev/docs/reference/traffic/#incoming) for more details.
Incoming traffic supports 2 modes of operation:
1. Mirror (**default**): Sniffs the TCP data from a port, and forwards a copy to the interested listeners;
2. Steal: Captures the TCP data from a port, and forwards it to the local process, see [`steal`](##steal);
### Minimal `incoming` config
```json { "feature": { "network": { "incoming": "steal" } } } ```
### Advanced `incoming` config
```json { "feature": { "network": { "incoming": { "mode": "steal", "http_header_filter": { "filter": "host: api\..+", "ports": [80, 8080] }, "port_mapping": [[ 7777, 8888 ]], "ignore_localhost": false, "ignore_ports": [9999, 10000] "listen_ports": [[80, 8111]] } } } } ``` | {"anyOf": [{"anyOf": [{}, {"type": "null"}]}, {}]} |
mirrord-schema.json | IncomingMode | Allows selecting between mirrorring or stealing traffic.
Can be set to either `"mirror"` (default), `"steal"` or `"off"`.
- `"mirror"`: Sniffs on TCP port, and send a copy of the data to listeners. - `"off"`: Disables the incoming network feature. - `"steal"`: Supports 2 modes of operation:
1. Port traffic stealing: Steals all TCP data from a port, which is selected whenever the user listens in a TCP socket (enabling the feature is enough to make this work, no additional configuration is needed);
2. HTTP traffic stealing: Steals only HTTP traffic, mirrord tries to detect if the incoming data on a port is HTTP (in a best-effort kind of way, not guaranteed to be HTTP), and steals the traffic on the port if it is HTTP; | {"oneOf": [{"type": "string", "enum": ["mirror"]}, {"type": "string", "enum": ["steal"]}, {"type": "string", "enum": ["off"]}]} |
mirrord-schema.json | IncomingMode | <!--${internal}--> ### mirror
Sniffs on TCP port, and send a copy of the data to listeners. | {"type": "string", "enum": ["mirror"]} |
mirrord-schema.json | IncomingMode | <!--${internal}--> ### steal
Stealer supports 2 modes of operation:
1. Port traffic stealing: Steals all TCP data from a port, which is selected whenever the user listens in a TCP socket (enabling the feature is enough to make this work, no additional configuration is needed);
2. HTTP traffic stealing: Steals only HTTP traffic, mirrord tries to detect if the incoming data on a port is HTTP (in a best-effort kind of way, not guaranteed to be HTTP), and steals the traffic on the port if it is HTTP; | {"type": "string", "enum": ["steal"]} |
mirrord-schema.json | IncomingMode | <!--${internal}--> ### Off
Disables the incoming network feature. | {"type": "string", "enum": ["off"]} |
mirrord-schema.json | InternalProxyFileConfig | Configuration for the internal proxy mirrord spawns for each local mirrord session that local layers use to connect to the remote agent
This is seldom used, but if you get `ConnectionRefused` errors, you might want to increase the timeouts a bit.
```json { "internal_proxy": { "start_idle_timeout": 30, "idle_timeout": 5, } } ``` | {"type": "object", "properties": {"idle_timeout": {"type": ["integer", "null"], "format": "uint64", "minimum": 0.0}, "start_idle_timeout": {"type": ["integer", "null"], "format": "uint64", "minimum": 0.0}}, "additionalProperties": false} |
mirrord-schema.json | idle_timeout | How much time to wait while we don't have any active connections before exiting.
Common cases would be running a chain of processes that skip using the layer and don't connect to the proxy.
```json { "internal_proxy": { "idle_timeout": 30 } } ``` | {"type": ["integer", "null"], "format": "uint64", "minimum": 0.0} |
mirrord-schema.json | start_idle_timeout | How much time to wait for the first connection to the proxy in seconds.
Common cases would be running with dlv or any other debugger, which sets a breakpoint on process execution, delaying the layer startup and connection to proxy.
```json { "internal_proxy": { "start_idle_timeout": 60 } } ``` | {"type": ["integer", "null"], "format": "uint64", "minimum": 0.0} |
mirrord-schema.json | NetworkFileConfig | Controls mirrord network operations.
See the network traffic [reference](https://mirrord.dev/docs/reference/traffic/) for more details.
```json { "feature": { "network": { "incoming": { "mode": "steal", "http_header_filter": { "filter": "host: api\..+", "ports": [80, 8080] }, "port_mapping": [[ 7777, 8888 ]], "ignore_localhost": false, "ignore_ports": [9999, 10000] }, "outgoing": { "tcp": true, "udp": true, "filter": { "local": ["tcp://1.1.1.0/24:1337", "1.1.5.0/24", "google.com", ":53"] }, "ignore_localhost": false, "unix_streams": "bear.+" }, "dns": false } } } ``` | {"type": "object", "properties": {"dns": {"type": ["boolean", "null"]}, "incoming": {"anyOf": [{}, {"type": "null"}]}, "outgoing": {"anyOf": [{}, {"type": "null"}]}}, "additionalProperties": false} |
mirrord-schema.json | dns | Resolve DNS via the remote pod.
Defaults to `true`. | {"type": ["boolean", "null"]} |
mirrord-schema.json | OutgoingFileConfig | Tunnel outgoing network operations through mirrord.
See the outgoing [reference](https://mirrord.dev/docs/reference/traffic/#outgoing) for more details.
The `remote` and `local` config for this feature are **mutually** exclusive.
```json { "feature": { "network": { "outgoing": { "tcp": true, "udp": true, "ignore_localhost": false, "filter": { "local": ["tcp://1.1.1.0/24:1337", "1.1.5.0/24", "google.com", ":53"] }, "unix_streams": "bear.+" } } } } ``` | {"type": "object", "properties": {"filter": {"anyOf": [{}, {"type": "null"}]}, "ignore_localhost": {"type": ["boolean", "null"]}, "tcp": {"type": ["boolean", "null"]}, "udp": {"type": ["boolean", "null"]}, "unix_streams": {"anyOf": [{}, {"type": "null"}]}}, "additionalProperties": false} |
mirrord-schema.json | filter | Unstable: the precise syntax of this config is subject to change. | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | ignore_localhost | Defaults to `false`. | {"type": ["boolean", "null"]} |
mirrord-schema.json | tcp | Defaults to `true`. | {"type": ["boolean", "null"]} |
mirrord-schema.json | udp | Defaults to `true`. | {"type": ["boolean", "null"]} |
mirrord-schema.json | unix_streams | Connect to these unix streams remotely (and to all other paths locally).
You can either specify a single value or an array of values. Each value is interpreted as a regular expression ([Supported Syntax](https://docs.rs/regex/1.7.1/regex/index.html#syntax)).
When your application connects to a unix socket, the target address will be converted to a string (non-utf8 bytes are replaced by a placeholder character) and matched against the set of regexes specified here. If there is a match, mirrord will connect your application with the target unix socket address on the target pod. Otherwise, it will leave the connection to happen locally on your machine. | {"anyOf": [{}, {"type": "null"}]} |
mirrord-schema.json | OutgoingFilterConfig | 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`.
You may use this option to specify when outgoing traffic is sent from the remote pod (which is the default behavior when you enable outgoing traffic), or from the local app (default when you have outgoing traffic disabled).
Takes a list of values, such as:
- Only UDP traffic on subnet `1.1.1.0/24` on port 1337 will go through the remote pod.
```json { "remote": ["udp://1.1.1.0/24:1337"] } ```
- Only UDP and TCP traffic on resolved address of `google.com` on port `1337` and `7331` will go through the remote pod. ```json { "remote": ["google.com:1337", "google.com:7331"] } ```
- Only TCP traffic on `localhost` on port 1337 will go through the local app, the rest will be emmited remotely in the cluster.
```json { "local": ["tcp://localhost:1337"] } ```
- Only outgoing traffic on port `1337` and `7331` will go through the local app. ```json { "local": [":1337", ":7331"] } ```
Valid values follow this pattern: `[protocol]://[name|address|subnet/mask]:[port]`. | {"oneOf": [{"type": "object", "required": ["remote"], "properties": {"remote": {}}, "additionalProperties": false}, {"type": "object", "required": ["local"], "properties": {"local": {}}, "additionalProperties": false}]} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.