8000 Make CONTAINER_RUNTIME a global override for all executors · localstack/localstack@567cd7f · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 567cd7f

Browse files
committed
Make CONTAINER_RUNTIME a global override for all executors
1 parent 392b1f4 commit 567cd7f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

localstack-core/localstack/config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,9 @@ def populate_edge_configuration(
870870
or (EXTERNAL_SERVICE_PORTS_START + 50)
871871
)
872872

873+
# The default container runtime to use
874+
CONTAINER_RUNTIME = os.environ.get("CONTAINER_RUNTIME", "").strip() or "docker"
875+
873876
# PUBLIC v1: -Xmx512M (example) Currently not supported in new provider but possible via custom entrypoint.
874877
# Allow passing custom JVM options to Java Lambdas executed in Docker.
875878
LAMBDA_JAVA_OPTS = os.environ.get("LAMBDA_JAVA_OPTS", "").strip()
@@ -979,7 +982,7 @@ def populate_edge_configuration(
979982

980983
# PUBLIC: docker (default), kubernetes (pro)
981984
# Where Lambdas will be executed.
982-
LAMBDA_RUNTIME_EXECUTOR = os.environ.get("LAMBDA_RUNTIME_EXECUTOR", "").strip()
985+
LAMBDA_RUNTIME_EXECUTOR = os.environ.get("LAMBDA_RUNTIME_EXECUTOR", CONTAINER_RUNTIME).strip()
983986

984987
# PUBLIC: 20 (default)
985988
# How many seconds Lambda will wait for the runtime environment to start up.
@@ -1239,6 +1242,7 @@ def use_custom_dns():
12391242
"CFN_STRING_REPLACEMENT_DENY_LIST",
12401243
"CFN_VERBOSE_ERRORS",
12411244
"CI",
1245+
"CONTAINER_RUNTIME",
12421246
"CUSTOM_SSL_CERT_PATH",
12431247
"DEBUG",
12441248
"DEBUG_HANDLER_CHAIN",

localstack-core/localstack/runtime/analytics.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
LOG = logging.getLogger(__name__)
99

1010
TRACKED_ENV_VAR = [
11+
"CONTAINER_RUNTIME",
1112
"DEBUG",
1213
"DEFAULT_REGION", # Not functional; deprecated in 0.12.7, removed in 3.0.0
1314
"DISABLE_CORS_CHECK",
@@ -17,6 +18,7 @@
1718
"DNS_ADDRESS",
1819
"DYNAMODB_ERROR_PROBABILITY",
1920
"EAGER_SERVICE_LOADING",
21+
"ECS_TASK_EXECUTOR",
2022
"EDGE_PORT",
2123
"ENFORCE_IAM",
2224
"IAM_SOFT_MODE",

0 commit comments

Comments
 (0)
0