Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
10e8ccc
docs(cookbook): config.toml [tools]/[jails] + cookbook + doc tooling
markovejnovic Jun 26, 2026
b676e88
feat(cfg): internal TOML reader with dotted-path fetch
markovejnovic Jun 26, 2026
c3be051
feat(cfg): layered get_cfg/1 resolver (runtime > toml > default)
markovejnovic Jun 26, 2026
26b7700
feat(cfg): Hyper.Cfg.Tools facade; define missing privileged tool paths
markovejnovic Jun 26, 2026
612d103
feat(cfg): Hyper.Cfg.Dirs facade; define firecracker_install_dir
markovejnovic Jun 26, 2026
49f204d
feat(cfg): Hyper.Cfg.Jails facade (cgroup, uid_gid_range)
markovejnovic Jun 26, 2026
daf81c9
feat(cfg): Hyper.Cfg.Vmlinux facade for the kernel map
markovejnovic Jun 26, 2026
9983f9e
refactor(cfg): remove Hyper.Config and dead config.exs keys
markovejnovic Jun 26, 2026
513dfd3
refactor(cfg): move Node.Config.Budget to Hyper.Cfg.Budget
markovejnovic Jun 26, 2026
5dca93d
refactor(cfg): move Node.Config.Img to Hyper.Cfg.Img
markovejnovic Jun 26, 2026
2ce4269
refactor(cfg): move Hyper.Grpc.Config to Hyper.Cfg.Grpc
markovejnovic Jun 26, 2026
22e77cf
refactor(cfg): move Img.Db.Gc.Config to Hyper.Cfg.Gc
markovejnovic Jun 26, 2026
bd85067
feat(cfg): Hyper.Cfg.Mon centralizes monitor sampling cadence
markovejnovic Jun 26, 2026
5717c4b
feat(cfg): Hyper.Cfg.Timeouts centralizes idle + call timeouts
markovejnovic Jun 26, 2026
f326e58
feat(cfg): read-only facades for telemetry/db/cluster config
markovejnovic Jun 26, 2026
66fb730
refactor(cfg): polish — alias ordering, format, batched review nits
markovejnovic Jun 26, 2026
a58ff05
wrap up config.md
markovejnovic Jun 26, 2026
b6e00c7
even better docs
markovejnovic Jun 26, 2026
40da0ee
feat(cfg): non-raising fetch_cfg/1 resolver sibling
markovejnovic Jun 26, 2026
b9e2fbe
feat(unit): string parsers for Information/Bandwidth/Time
markovejnovic Jun 26, 2026
d5d060f
feat(cfg): dual-source Budget (config.exs + [budget] toml) + cpu_max_cap
markovejnovic Jun 26, 2026
87a6bb4
feat(cfg): dual-source Gc ([img.gc] toml) + rename statement_timeout-…
markovejnovic Jun 26, 2026
7e82149
feat(cfg): dual-source Grpc ([grpc] toml) + cred coercion
markovejnovic Jun 26, 2026
cefac86
feat(cfg): reshape VmLinux to amd64/aarch64 dual-source keys
markovejnovic Jun 26, 2026
198e866
feat(cfg): Img.store dual-source; Dirs.layer_dir delegates to it
markovejnovic Jun 26, 2026
d765a0d
feat(cfg): Otel config + opentelemetry exporter wiring; drop Telemetr…
markovejnovic Jun 26, 2026
4c1f264
feat(cfg): Img.Db config + Ecto Repo init/2 merge; drop Db facade
markovejnovic Jun 26, 2026
5adb629
refactor(cfg): reconcile config files + formatting/credo with phase-2…
markovejnovic Jun 26, 2026
ec6e1c1
docs(cfg): note [grpc] toml source + cred coercion; hoist import to top
markovejnovic Jun 26, 2026
06f7a27
docs(cookbook): reconcile config.md with phase-2 dual-source config
markovejnovic Jun 27, 2026
5a08065
docs(cookbook): drop module/toml labels from config.md section headers
markovejnovic Jun 27, 2026
9f6ff82
docs(cookbook): use realistic kernel/layer-store paths in config exam…
markovejnovic Jun 27, 2026
e95b7e9
feat(cfg): GC is non-disablable core; Mon cadence fixed (not runtime)…
markovejnovic Jun 27, 2026
5c21aab
refactor(unit): parse durations/sizes via Integer.parse, not regex
markovejnovic Jun 27, 2026
a468700
test(cfg,unit): parametrize parse/toml tables; tighten vm_linux; drop…
markovejnovic Jun 27, 2026
17a8754
test(cfg,unit): parametrize parse/toml tables; tighten vm_linux
markovejnovic Jun 27, 2026
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
5 changes: 0 additions & 5 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ config :libcluster,
]
]

config :hyper,
cgroup_parent: "hyper",
uid_gid_range: {900_000, 999_999},
layer_dir: "/srv/hyper/layers"

if config_env() == :test do
config :opentelemetry, traces_exporter: :none
# No cluster formation during tests.
Expand Down
38 changes: 24 additions & 14 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,39 @@ import Config

# Per-node resource budget. Lives in runtime config because it builds `Unit.*`
# values, which are only loadable once the app's modules are on the code path.
config :hyper, Hyper.Node.Config.Budget,
config :hyper, Hyper.Cfg.Budget,
mem_max: Unit.Information.gib(4),
disk_max: Unit.Information.gib(4),
cpu_max_load: 0.8,
cpu_max_cap: 4.0,
disk_bw_cap: Unit.Bandwidth.gibps(1),
disk_bw_max_load: 0.8,
net_bw_cap: Unit.Bandwidth.gibps(1),
net_bw_max_load: 0.8

# Where to send traces. Defaults to Honeycomb; override OTEL_EXPORTER_OTLP_*
# to point at any OTLP/HTTP backend (Collector, Grafana, etc).
# Operator overrides from a well-known location. An optional Elixir config file
# at /etc/hyper/config.exs (override the path with HYPER_CONFIG) is merged in
# last, so its values win over every default set above. An absent file is a
# no-op — the normal case in dev and CI. Skipped under :test so the suite never
# reads host state.
#
# OpenTelemetry exporter wiring is resolved through Hyper.Cfg.Otel so that the
# operator's `config :hyper, Hyper.Cfg.Otel, ...` stanza (if present) takes
# precedence over the TOML table and environment variables.
if config_env() != :test do
endpoint = System.get_env("OTEL_EXPORTER_OTLP_ENDPOINT", "https://api.honeycomb.io")
hyper_config = System.get_env("HYPER_CONFIG") || "/etc/hyper/config.exs"

headers =
case System.get_env("HONEYCOMB_API_KEY") do
nil -> []
"" -> []
key -> [{"x-honeycomb-team", key}]
end
operator =
if File.exists?(hyper_config),
do: Config.Reader.read!(hyper_config, env: config_env()),
else: []

config :opentelemetry_exporter,
otlp_protocol: :http_protobuf,
otlp_endpoint: endpoint,
otlp_headers: headers
otel_exs = get_in(operator, [:hyper, Hyper.Cfg.Otel]) || []

case Hyper.Cfg.Otel.exporter_options(otel_exs) do
{:ok, opts} -> config :opentelemetry_exporter, opts
:none -> config :opentelemetry, traces_exporter: :none
end

for {app, kw} <- operator, do: config(app, kw)
end
Loading
Loading