Init BM MCC+MOSK commit
Just put templates to the repo
MOSSUST-114
Change-Id: I2239dd7067d823d3ab15d1d46dc57fc2c7b9444b
diff --git a/bm_mcc_mosk/kaas-mgmt/ipam-objects.yaml b/bm_mcc_mosk/kaas-mgmt/ipam-objects.yaml
new file mode 100644
index 0000000..eb5535d
--- /dev/null
+++ b/bm_mcc_mosk/kaas-mgmt/ipam-objects.yaml
@@ -0,0 +1,209 @@
+---
+# This template allows you to configure networking for servers
+# of the management cluster of Mirantis Container Cloud. Network
+# configuration requires the following resources.
+
+# WARNING: Since Container Cloud 2.24, the default networking
+# definition schema has been significantly changed.
+# Older templates will not work for 2.24+ release bootstrap deployment.
+# For details, see
+# https://docs.mirantis.com/container-cloud/latest/deployment-guide/deploy-bm-mgmt.html
+
+# The 'mgmt-lb-pxe' Subnet object defines the range of IP addresses
+# used by MetalLB to expose services in the PXE network. This
+# includes Ironic API (bare metal provisioning server), HTTP server
+# that provides images for network boot and server provisioning,
+# and the caching server for accessing the Container Cloud artifacts
+# deployed on the hosts.
+apiVersion: "ipam.mirantis.com/v1alpha1"
+kind: Subnet
+metadata:
+ name: mgmt-lb-pxe
+ namespace: default
+ labels:
+ kaas.mirantis.com/provider: baremetal
+ cluster.sigs.k8s.io/cluster-name: kaas-mgmt
+ ipam/SVC-MetalLB: "presents"
+ metallb/address-pool-auto-assign: "false"
+ metallb/address-pool-name: services-pxe
+ metallb/address-pool-protocol: layer2
+spec:
+ cidr: 172.16.180.0/23
+ includeRanges:
+ - 172.16.181.10-172.16.181.13
+---
+apiVersion: "ipam.mirantis.com/v1alpha1"
+kind: Subnet
+metadata:
+ name: mgmt-pxe
+ namespace: default
+ labels:
+ kaas.mirantis.com/provider: baremetal
+ ipam/SVC-dhcp-range: "presents"
+spec:
+ cidr: 172.16.180.0/23
+ includeRanges:
+ - 172.16.181.14-172.16.181.30
+
+---
+# The 'mgmt-pxe-nics' Subnet object defines the range of IP addresses
+# for NIC IPs, from the PXE range that will be allocated on the nodes NICs
+# in the PXE network after nodes provisioning.
+# Required to elliminate prossible dhcp routing issues.
+apiVersion: "ipam.mirantis.com/v1alpha1"
+kind: Subnet
+metadata:
+ name: mgmt-pxe-nics
+ namespace: default
+ labels:
+ kaas.mirantis.com/provider: baremetal
+ cluster.sigs.k8s.io/cluster-name: kaas-mgmt
+ # Label 'ipam/SVC-pxe-nics' is mandatory for this type of network.
+ ipam/SVC-pxe-nics: "presents"
+spec:
+ cidr: 172.16.180.0/23
+ gateway: 172.16.180.1
+ includeRanges:
+ - 172.16.181.31-172.16.181.50
+
+---
+apiVersion: "ipam.mirantis.com/v1alpha1"
+kind: Subnet
+metadata:
+ name: mgmt-k8s-api-lb
+ namespace: default
+ labels:
+ kaas.mirantis.com/provider: baremetal
+ cluster.sigs.k8s.io/cluster-name: kaas-mgmt
+ ipam/SVC-LBhost: "presents"
+spec:
+ cidr: 172.16.181.3/32
+ useWholeCidr: true
+---
+# The 'mgmt-nics' Subnet defines the range of IP addresses to be allocated
+# to the nodes in the management/LCM network. The IP address of Kubernetes
+# API endpoint for the cluster is excluded from that range. The
+# MetalLB address pools are also excluded from that range.
+apiVersion: "ipam.mirantis.com/v1alpha1"
+kind: Subnet
+metadata:
+ name: mgmt-nics
+ namespace: default
+ labels:
+ kaas.mirantis.com/provider: baremetal
+ cluster.sigs.k8s.io/cluster-name: kaas-mgmt
+ ipam/SVC-k8s-lcm: "presents"
+spec:
+ cidr: 172.16.180.0/23
+ gateway: 172.16.180.1
+ nameservers:
+ - 172.18.176.6
+ - 8.8.8.8
+ includeRanges:
+ - 172.16.181.51-172.16.181.100
+
+---
+# The 'mgmt-k8s-lb' Subnet object defines the range of IP addresses
+# used by MetalLB to expose services in the LCM/Management network.
+# It defines the same MetalLB address pool that was previously defined
+# in MetalLB chart values configInline parameter (which is deprecated).
+# These services include Keycloak, MCC UI, Stacklight services,
+# and the caching server for accessing the Container Cloud artifacts
+# deployed on the hosts.
+apiVersion: "ipam.mirantis.com/v1alpha1"
+kind: Subnet
+metadata:
+ name: mgmt-k8s-lb
+ namespace: default
+ labels:
+ kaas.mirantis.com/provider: baremetal
+ cluster.sigs.k8s.io/cluster-name: kaas-mgmt
+ ipam/SVC-MetalLB: "presents"
+ metallb/address-pool-auto-assign: "true"
+ metallb/address-pool-name: default
+ metallb/address-pool-protocol: layer2
+spec:
+ cidr: 172.16.180.0/23
+ includeRanges:
+ - 172.16.181.101-172.16.181.140
+
+---
+apiVersion: ipam.mirantis.com/v1alpha1
+kind: MetalLBConfigTemplate
+metadata:
+ labels:
+ kaas.mirantis.com/provider: baremetal
+ cluster.sigs.k8s.io/cluster-name: kaas-mgmt
+ name: kaas-mgmt-metallb
+ namespace: default
+spec:
+ templates:
+ l2Advertisements: |
+ - name: default
+ spec:
+ ipAddressPools:
+ - default
+ - services-pxe
+---
+# L2Template allows you to create advanced host networking
+# configurations for your management cluster. For example,
+# you can create bond interfaces on top of physical interfaces
+# on the host, or use multiple subnets to separate different
+# types of network traffic.
+# More elaborate network configurations for the management cluster
+# require changes in this resource template and potential
+# adding of more Subnet resources for other networks.
+# For more details, see
+# https://docs.mirantis.com/container-cloud/latest/deployment-guide/deploy-bm-mgmt.rst
+apiVersion: ipam.mirantis.com/v1alpha1
+kind: L2Template
+metadata:
+ name: default
+ namespace: default
+ labels:
+ kaas.mirantis.com/provider: baremetal
+ cluster.sigs.k8s.io/cluster-name: kaas-mgmt
+ ipam/DefaultForCluster: "1"
+spec:
+ autoIfMappingPrio:
+ - provision
+ - enp
+ - eno
+ - ens
+ # The 'l3Layout' section defines the list of subnets to be used in the
+ # 'npTemplate' field.
+ l3Layout:
+ - scope: namespace
+ # 'subnetName' defines the name of the subnet that is used
+ # to refer to it throughout the 'npTemplate' below.
+ subnetName: kaas-mgmt
+ # 'labelSelector' is the combination of labels that allows
+ # detecting a unique subnet. These labels refer to the Subnet object.
+ labelSelector:
+ kaas.mirantis.com/provider: baremetal
+ ipam/SVC-k8s-lcm: "presents"
+ - scope: namespace
+ subnetName: mgmt-pxe
+ labelSelector:
+ kaas.mirantis.com/provider: baremetal
+ ipam/SVC-pxe-nics: "presents"
+ # The following is the template used to generate a netplan configuration
+ # file for Ubuntu. It contains an example of the definition of ethernet
+ # interfaces, with assigned addresses from the subnets defined in the 'l3Layout'
+ # field above. The gateway and nameservers are also
+ # taken from the subnet using the L2Temlpate-specific macros.
+ npTemplate: |
+ version: 2
+ renderer: networkd
+ ethernets:
+ {{nic 0}}:
+ dhcp4: false
+ dhcp6: false
+ addresses:
+ - {{ip "0:kaas-mgmt"}}
+ gateway4: {{gateway_from_subnet "kaas-mgmt"}}
+ nameservers:
+ addresses: {{nameservers_from_subnet "kaas-mgmt"}}
+ match:
+ macaddress: {{mac 0}}
+ set-name: {{nic 0}}
\ No newline at end of file