fix(garage): Garage doesn't like empty TOML sections
All checks were successful
Build all the nodes / netcore02 (push) Successful in 23s
Build all the nodes / ap01 (push) Successful in 1m6s
Build the shell / build-shell (push) Successful in 33s
Build all the nodes / hypervisor01 (push) Successful in 1m40s
Run pre-commit on all files / pre-commit (push) Successful in 24s
Build all the nodes / hypervisor03 (push) Successful in 1m45s
Build all the nodes / tower01 (push) Successful in 1m47s
Build all the nodes / vault01 (push) Successful in 2m24s
Build all the nodes / bridge01 (push) Successful in 2m30s
Build all the nodes / build01 (push) Successful in 2m37s
Build all the nodes / geo02 (push) Successful in 2m38s
Build all the nodes / compute01 (push) Successful in 2m42s
Build all the nodes / geo01 (push) Successful in 2m44s
Build all the nodes / hypervisor02 (push) Successful in 2m50s
Build all the nodes / rescue01 (push) Successful in 2m50s
Build all the nodes / web02 (push) Successful in 2m55s
Build all the nodes / storage01 (push) Successful in 2m56s
Build all the nodes / web01 (push) Successful in 3m19s
Build all the nodes / web03 (push) Successful in 2m57s

This commit is contained in:
sinavir 2025-01-14 17:42:11 +01:00
parent 5b02658e08
commit 81690c1ea3
No known key found for this signature in database

View file

@ -29,9 +29,11 @@ let
port port
; ;
mkListen = mkIfNotNull = v: mkIf (v != null);
local: port:
mkIf (port != null) "${if local then "127.0.0.1" else "[::]"}:${builtins.toString port}"; mkListen = local: port: "${if local then "127.0.0.1" else "[::]"}:${builtins.toString port}";
mkOptionalListen = local: port: mkIfNotNull port (mkListen local port);
mkPortOption = mkPortOption =
name: name:
@ -119,23 +121,25 @@ in
compression_level = 7; compression_level = 7;
rpc_bind_addr = mkListen false cfg.ports.rpc; rpc_bind_addr = mkOptionalListen false cfg.ports.rpc;
rpc_public_addr = "${meta.network.${name}.netbirdIp}:${builtins.toString cfg.ports.rpc}"; rpc_public_addr = "${meta.network.${name}.netbirdIp}:${builtins.toString cfg.ports.rpc}";
rpc_secret_file = config.age.secrets."garage-rpc_secret_file".path; rpc_secret_file = config.age.secrets."garage-rpc_secret_file".path;
s3_api = { s3_api = {
s3_region = "garage"; s3_region = "garage";
api_bind_addr = mkListen true cfg.ports.s3_api; api_bind_addr = mkOptionalListen true cfg.ports.s3_api;
root_domain = mkDefault ".s3.dgnum"; root_domain = mkDefault ".s3.dgnum";
}; };
s3_web = { s3_web = {
bind_addr = mkListen true cfg.ports.s3_web; bind_addr = mkOptionalListen true cfg.ports.s3_web;
index = "index.html"; index = "index.html";
root_domain = mkDefault ".web.dgnum"; root_domain = mkDefault ".web.dgnum";
}; };
k2v_api.api_bind_addr = mkListen false cfg.ports.k2v_api; k2v_api = mkIfNotNull cfg.ports.k2v_api {
api_bind_addr = mkListen false cfg.ports.k2v_api;
};
admin = { admin = {
api_bind_addr = mkListen true cfg.ports.admin_api; api_bind_addr = mkListen true cfg.ports.admin_api;