diff --git a/crates/runtime/src/container.rs b/crates/runtime/src/container.rs index 94cb5149b3..91f127dd90 100644 --- a/crates/runtime/src/container.rs +++ b/crates/runtime/src/container.rs @@ -117,7 +117,6 @@ pub async fn start( "--env=LOG_FORMAT=json".to_string(), format!("--env=LOG_LEVEL={}", log_level.as_str_name()), // Cgroup memory / CPU resource limits. - // TODO(johnny): we intend to tighten these down further, over time. "--memory=1g".to_string(), "--cpus=2".to_string(), // For now, we support only Linux amd64 connectors. @@ -146,6 +145,10 @@ pub async fn start( ]) } + if let Some(cgroup_parent) = std::env::var("CONNECTOR_CGROUP_PARENT").ok() { + docker_args.append(&mut vec!["--cgroup-parent".to_string(), cgroup_parent]); + } + docker_args.append(&mut vec![ // Image to run. image.to_string(),