blob: 2a88aa83bdea30ef7c0d311d26c6c393099a9d24 [file] [log] [blame]
Vladimir Khlyunevcc648af2024-04-25 19:56:40 +04001---
Vladimir Khlyunevcc648af2024-04-25 19:56:40 +04002apiVersion: "ipam.mirantis.com/v1alpha1"
3kind: Subnet
4metadata:
5 name: mgmt-pxe
6 namespace: default
7 labels:
8 kaas.mirantis.com/provider: baremetal
9 ipam/SVC-dhcp-range: "presents"
10spec:
11 cidr: 172.16.180.0/23
12 includeRanges:
13 - 172.16.181.14-172.16.181.30
14
15---
16# The 'mgmt-pxe-nics' Subnet object defines the range of IP addresses
17# for NIC IPs, from the PXE range that will be allocated on the nodes NICs
18# in the PXE network after nodes provisioning.
19# Required to elliminate prossible dhcp routing issues.
20apiVersion: "ipam.mirantis.com/v1alpha1"
21kind: Subnet
22metadata:
23 name: mgmt-pxe-nics
24 namespace: default
25 labels:
26 kaas.mirantis.com/provider: baremetal
27 cluster.sigs.k8s.io/cluster-name: kaas-mgmt
28 # Label 'ipam/SVC-pxe-nics' is mandatory for this type of network.
29 ipam/SVC-pxe-nics: "presents"
30spec:
31 cidr: 172.16.180.0/23
32 gateway: 172.16.180.1
33 includeRanges:
34 - 172.16.181.31-172.16.181.50
35
36---
37apiVersion: "ipam.mirantis.com/v1alpha1"
38kind: Subnet
39metadata:
40 name: mgmt-k8s-api-lb
41 namespace: default
42 labels:
43 kaas.mirantis.com/provider: baremetal
44 cluster.sigs.k8s.io/cluster-name: kaas-mgmt
45 ipam/SVC-LBhost: "presents"
46spec:
47 cidr: 172.16.181.3/32
48 useWholeCidr: true
49---
50# The 'mgmt-nics' Subnet defines the range of IP addresses to be allocated
51# to the nodes in the management/LCM network. The IP address of Kubernetes
52# API endpoint for the cluster is excluded from that range. The
53# MetalLB address pools are also excluded from that range.
54apiVersion: "ipam.mirantis.com/v1alpha1"
55kind: Subnet
56metadata:
57 name: mgmt-nics
58 namespace: default
59 labels:
60 kaas.mirantis.com/provider: baremetal
61 cluster.sigs.k8s.io/cluster-name: kaas-mgmt
62 ipam/SVC-k8s-lcm: "presents"
63spec:
64 cidr: 172.16.180.0/23
65 gateway: 172.16.180.1
66 nameservers:
67 - 172.18.176.6
68 - 8.8.8.8
69 includeRanges:
70 - 172.16.181.51-172.16.181.100
71
72---
Vladimir Khlyunevcc648af2024-04-25 19:56:40 +040073apiVersion: ipam.mirantis.com/v1alpha1
74kind: MetalLBConfigTemplate
75metadata:
76 labels:
77 kaas.mirantis.com/provider: baremetal
78 cluster.sigs.k8s.io/cluster-name: kaas-mgmt
79 name: kaas-mgmt-metallb
80 namespace: default
81spec:
82 templates:
83 l2Advertisements: |
84 - name: default
85 spec:
86 ipAddressPools:
87 - default
88 - services-pxe
89---
90# L2Template allows you to create advanced host networking
91# configurations for your management cluster. For example,
92# you can create bond interfaces on top of physical interfaces
93# on the host, or use multiple subnets to separate different
94# types of network traffic.
95# More elaborate network configurations for the management cluster
96# require changes in this resource template and potential
97# adding of more Subnet resources for other networks.
98# For more details, see
99# https://docs.mirantis.com/container-cloud/latest/deployment-guide/deploy-bm-mgmt.rst
100apiVersion: ipam.mirantis.com/v1alpha1
101kind: L2Template
102metadata:
103 name: default
104 namespace: default
105 labels:
106 kaas.mirantis.com/provider: baremetal
107 cluster.sigs.k8s.io/cluster-name: kaas-mgmt
108 ipam/DefaultForCluster: "1"
109spec:
110 autoIfMappingPrio:
111 - provision
112 - enp
113 - eno
114 - ens
115 # The 'l3Layout' section defines the list of subnets to be used in the
116 # 'npTemplate' field.
117 l3Layout:
118 - scope: namespace
119 # 'subnetName' defines the name of the subnet that is used
120 # to refer to it throughout the 'npTemplate' below.
121 subnetName: kaas-mgmt
122 # 'labelSelector' is the combination of labels that allows
123 # detecting a unique subnet. These labels refer to the Subnet object.
124 labelSelector:
125 kaas.mirantis.com/provider: baremetal
126 ipam/SVC-k8s-lcm: "presents"
127 - scope: namespace
128 subnetName: mgmt-pxe
129 labelSelector:
130 kaas.mirantis.com/provider: baremetal
131 ipam/SVC-pxe-nics: "presents"
132 # The following is the template used to generate a netplan configuration
133 # file for Ubuntu. It contains an example of the definition of ethernet
134 # interfaces, with assigned addresses from the subnets defined in the 'l3Layout'
135 # field above. The gateway and nameservers are also
136 # taken from the subnet using the L2Temlpate-specific macros.
137 npTemplate: |
138 version: 2
139 renderer: networkd
140 ethernets:
141 {{nic 0}}:
142 dhcp4: false
143 dhcp6: false
144 addresses:
145 - {{ip "0:kaas-mgmt"}}
146 gateway4: {{gateway_from_subnet "kaas-mgmt"}}
147 nameservers:
148 addresses: {{nameservers_from_subnet "kaas-mgmt"}}
149 match:
150 macaddress: {{mac 0}}
151 set-name: {{nic 0}}