feat(vault01): Add user vlans
Some checks failed
Check meta / check_meta (pull_request) Successful in 17s
Check meta / check_dns (pull_request) Successful in 35s
build configuration / build_compute01 (pull_request) Successful in 57s
build configuration / build_storage01 (pull_request) Successful in 51s
build configuration / build_vault01 (pull_request) Successful in 49s
build configuration / build_web01 (pull_request) Successful in 1m15s
build configuration / build_web02 (pull_request) Successful in 49s
build configuration / build_rescue01 (pull_request) Successful in 47s
build configuration / push_to_cache (pull_request) Failing after 2m11s
build configuration / build_storage01 (push) Successful in 58s
build configuration / build_compute01 (push) Successful in 1m4s
build configuration / build_vault01 (push) Successful in 58s
build configuration / build_web02 (push) Successful in 49s
build configuration / build_rescue01 (push) Successful in 49s
lint / check (push) Successful in 22s
build configuration / build_web01 (push) Successful in 1m18s
build configuration / push_to_cache (push) Successful in 2m12s

Only the first 300 vlans are activated, 850 make it crash
This commit is contained in:
catvayor 2024-04-15 09:34:13 +02:00 committed by thubrecht
parent 9e75839ada
commit 01c2505491

View file

@ -35,6 +35,21 @@ let
vlanConfig.Id = Id;
};
mkUserVlan =
id:
let
vlan = 3245 + id;
prefix24nb = id / 32;
prefix29nb = (id - prefix24nb * 32) * 8;
in
{
name = "vlan-user-${builtins.toString vlan}";
value = {
Id = vlan;
address = [ "10.0.${builtins.toString prefix24nb}.${builtins.toString (prefix29nb + 1)}/29" ];
};
};
vlans = {
vlan-uplink-cri = {
Id = 223;
@ -67,7 +82,7 @@ let
extraNetwork.networkConfig.DHCPServer = "yes";
};
};
} // builtins.listToAttrs (builtins.genList mkUserVlan 300); # 850 when we can
in
{