blob: 73234f7b8cc033794d4377c23a1e76d4f7efcad6 [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 +040073# L2Template allows you to create advanced host networking
74# configurations for your management cluster. For example,
75# you can create bond interfaces on top of physical interfaces
76# on the host, or use multiple subnets to separate different
77# types of network traffic.
78# More elaborate network configurations for the management cluster
79# require changes in this resource template and potential
80# adding of more Subnet resources for other networks.
81# For more details, see
82# https://docs.mirantis.com/container-cloud/latest/deployment-guide/deploy-bm-mgmt.rst
83apiVersion: ipam.mirantis.com/v1alpha1
84kind: L2Template
85metadata:
86 name: default
87 namespace: default
88 labels:
89 kaas.mirantis.com/provider: baremetal
90 cluster.sigs.k8s.io/cluster-name: kaas-mgmt
91 ipam/DefaultForCluster: "1"
92spec:
93 autoIfMappingPrio:
94 - provision
95 - enp
96 - eno
97 - ens
98 # The 'l3Layout' section defines the list of subnets to be used in the
99 # 'npTemplate' field.
100 l3Layout:
101 - scope: namespace
102 # 'subnetName' defines the name of the subnet that is used
103 # to refer to it throughout the 'npTemplate' below.
104 subnetName: kaas-mgmt
105 # 'labelSelector' is the combination of labels that allows
106 # detecting a unique subnet. These labels refer to the Subnet object.
107 labelSelector:
108 kaas.mirantis.com/provider: baremetal
109 ipam/SVC-k8s-lcm: "presents"
110 - scope: namespace
111 subnetName: mgmt-pxe
112 labelSelector:
113 kaas.mirantis.com/provider: baremetal
114 ipam/SVC-pxe-nics: "presents"
115 # The following is the template used to generate a netplan configuration
116 # file for Ubuntu. It contains an example of the definition of ethernet
117 # interfaces, with assigned addresses from the subnets defined in the 'l3Layout'
118 # field above. The gateway and nameservers are also
119 # taken from the subnet using the L2Temlpate-specific macros.
120 npTemplate: |
121 version: 2
122 renderer: networkd
123 ethernets:
124 {{nic 0}}:
125 dhcp4: false
126 dhcp6: false
127 addresses:
128 - {{ip "0:kaas-mgmt"}}
129 gateway4: {{gateway_from_subnet "kaas-mgmt"}}
130 nameservers:
131 addresses: {{nameservers_from_subnet "kaas-mgmt"}}
132 match:
133 macaddress: {{mac 0}}
134 set-name: {{nic 0}}