Replace dotenv (.env) Configuration with Fixed Configuration Files#19
Merged
Conversation
Member
Author
|
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
yulmwu
commented
Jun 7, 2026
kim6wol0
added a commit
to nullforu/smctf-infra-v2
that referenced
this pull request
Jun 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, configuration values for
sbxlet,sbxorch, andsbxctlwere managed using dotenv (.env) environment variables.However, these components are not typical web servers or microservices, and it was determined that this approach introduced unnecessary operational overhead.
As a result, configuration is now managed through JSON configuration files located at the following paths by default:
/var/lib/sandboxd/sbxlet_config.json/var/lib/sandboxd/sbxorch_config.json/var/lib/sandboxd/sbxctl_config.jsonEach configuration file preserves the existing dotenv-style key-value settings. An example is shown below.
{ "app_env": "dev", "http_addr": ":8081", "log_dir": "/logs/sbxlet", "log_file_prefix": "sandboxd", "containerd_address": "/run/containerd/containerd.sock", "state_base_dir": "/var/lib/sandboxd/sandboxes", "lock_dir": "/var/lib/sandboxd/locks", "cgroup_parent": "", "bridge_interface": "sbx-br0", "subnet_cidr": "10.89.0.0/16", "cni_conf_path": "/etc/cni/sandboxd.d/20-sbxnet.conflist", "forward_hook_chains": ["FORWARD", "DOCKER-USER"], "reconcile_interval": "15s", "reconcile_grace": "5s", "reconcile_hits": 2, "runtime_binary": "runsc", "default_ephemeral_storage": "128Mi", "rootfs_ratio_percent": 80, "tmpfs_ratio_percent": 20, "max_alloc_percent": 90, "provision_timeout": "4m", "container_create_timeout": "2m", "image_pull_timeout": "8m" }{ "app_env": "dev", "http_addr": ":8082", "log_dir": "/logs/sbxorch", "log_file_prefix": "orchestrator", "sqlite_path": "/var/lib/sandboxd/orchestrator.db", "heartbeat_interval": "10s", "probe_timeout": "3s", "sandbox_op_timeout": "60s", "heartbeat_parallel": false, "heartbeat_max_parallel": 4, "resource_sync_interval": "30s", "resource_persist_min_interval": "30s", "resource_persist_max_interval": "5m", "ready_success_threshold": 2, "notready_failure_threshold": 2, "shutdown_timeout": "5s", "scheduler_interval": "3s", "reconcile_interval": "5s", "status_sync_interval": "20s", "status_sync_timeout": "5s", "status_sync_batch_size": 50, "status_sync_max_parallel": 4, "host_port_min": 10000, "host_port_max": 32767, "create_rps": 20, "create_burst": 40 }{ "server": "http://10.10.0.1:8082", "timeout": "10s", "output": "", "limit": 100 }The configuration file path can be overridden using the
-cor--configoption for each component.While the dotenv-based configuration mechanism has been removed, environment variable overrides remain supported and continue to take precedence over values defined in the configuration files.
For more details, please refer to the updated source code.