Skip to content

Introduce CONTAINER_RUNTIME environment variable to control all container runtimes #11793

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

Merged
merged 1 commit into from
Nov 7, 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
6 changes: 5 additions & 1 deletion localstack-core/localstack/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,9 @@ def populate_edge_configuration(
or (EXTERNAL_SERVICE_PORTS_START + 50)
)

# The default container runtime to use
CONTAINER_RUNTIME = os.environ.get("CONTAINER_RUNTIME", "").strip() or "docker"

# PUBLIC v1: -Xmx512M (example) Currently not supported in new provider but possible via custom entrypoint.
# Allow passing custom JVM options to Java Lambdas executed in Docker.
LAMBDA_JAVA_OPTS = os.environ.get("LAMBDA_JAVA_OPTS", "").strip()
Expand Down Expand Up @@ -979,7 +982,7 @@ def populate_edge_configuration(

# PUBLIC: docker (default), kubernetes (pro)
# Where Lambdas will be executed.
LAMBDA_RUNTIME_EXECUTOR = os.environ.get("LAMBDA_RUNTIME_EXECUTOR", "").strip()
LAMBDA_RUNTIME_EXECUTOR = os.environ.get("LAMBDA_RUNTIME_EXECUTOR", CONTAINER_RUNTIME).strip()

# PUBLIC: 20 (default)
# How many seconds Lambda will wait for the runtime environment to start up.
Expand Down Expand Up @@ -1239,6 +1242,7 @@ def use_custom_dns():
"CFN_STRING_REPLACEMENT_DENY_LIST",
"CFN_VERBOSE_ERRORS",
"CI",
"CONTAINER_RUNTIME",
"CUSTOM_SSL_CERT_PATH",
"DEBUG",
"DEBUG_HANDLER_CHAIN",
Expand Down
2 changes: 2 additions & 0 deletions localstack-core/localstack/runtime/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
LOG = logging.getLogger(__name__)

TRACKED_ENV_VAR = [
"CONTAINER_RUNTIME",
"DEBUG",
"DEFAULT_REGION", # Not functional; deprecated in 0.12.7, removed in 3.0.0
"DISABLE_CORS_CHECK",
Expand All @@ -17,6 +18,7 @@
"DNS_ADDRESS",
"DYNAMODB_ERROR_PROBABILITY",
"EAGER_SERVICE_LOADING",
"ECS_TASK_EXECUTOR",
"EDGE_PORT",
"ENFORCE_IAM",
"IAM_SOFT_MODE",
Expand Down
Loading