-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path20-net-subnets.yml.j2
78 lines (73 loc) · 1.84 KB
/
20-net-subnets.yml.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{% set all_net = home_net | combine(internal_net, wg_net) %}
__subnet_overrides:
{% set __subnet_map = {
"switches": 28,
"hosts": 28,
"_r10": 27,
"trusted": 28,
"webgw": 30,
"_r20": 30,
"_r30": 29,
"rom": 28,
"_r40": 28,
"clients": 26,
} %}
mt: {{ all_net.mt | andrei.utils.subnets_from_map(__subnet_map, v6_size=80) }}
__subnet_extensions:
{% set __subnet_map = {
"localgw": 28,
"_r10": 30,
"pg": 30,
"pgbackrest": 31,
"gitlab": 31,
"gitrun": 30,
"loki": 30,
"minio": 30,
"nextcloud": 31,
"docker": 31,
"prom": 31,
"_r20": 31,
"_r25": 28,
"_r30": 26,
"_r40": 27,
"_r50": 28,
"clients": -28,
} %}
vm: {{ all_net.vm | andrei.utils.subnets_from_map(__subnet_map, v4_start=63, v6_prefix_skip=3, v6_size=80) }}
{% set __subnet_map_kube_internal = {
"svc": 18,
"pod": 18,
"lb": 26,
"mon": 26,
} %}
{% set __subnet_map = {
"control_plane": 28,
"worker": 28,
"_r10": 27,
"_r20": 26,
"_r30": 27,
"_r40": 28,
"clients": -28,
} %}
talos: {{ all_net.talos | andrei.utils.subnets_from_map(__subnet_map, v4_start=63, v6_prefix_skip=3, v6_size=80)
| combine(all_net.talos | andrei.utils.subnets_from_map(__subnet_map_kube_internal, v4_name="cidr_internal", v6_name="cidr6_internal", v6_size=64)) }}
{% set __subnet_map = {
"trusted": 28,
"noinet": 28,
"_r10": 27,
"clients": 25,
} %}
general: {{ all_net.general | andrei.utils.subnets_from_map(__subnet_map, v4_start=48, v6_prefix_skip=3, v6_size=80) }}
{% set __subnet_map = {
"ipmi": 27,
"_r10": 27,
"clients": 25,
} %}
mgmt: {{ all_net.mgmt | andrei.utils.subnets_from_map(__subnet_map, v4_start=32, v6_prefix_skip=3, v6_size=80) }}
{% set __subnet_map = {
"localgw": 28,
"_r20": 28,
"talos": 27,
"clients": -25,
} %}
san: {{ all_net.san | andrei.utils.subnets_from_map(__subnet_map, v4_start=63, v6_prefix_skip=3, v6_size=80) }}