Mirantis Container Cloud (MCC) becomes part of Mirantis OpenStack for Kubernetes (MOSK)!
Starting with MOSK 25.2, the MOSK documentation set covers all product layers, including MOSK management (formerly Container Cloud). This means everything you need is in one place. Some legacy names may remain in the code and documentation and will be updated in future releases. The separate Container Cloud documentation site will be retired, so please update your bookmarks for continued easy access to the latest content.
SubnetPool¶
Unsupported since MCC 2.28.0 (17.3.0 and 16.3.0)
Warning
The SubnetPool object is unsupported since Container Cloud
2.28.0 (Cluster releases 17.3.0 and 16.3.0). For details, see
Deprecation Notes: SubnetPool resource management.
This section describes the SubnetPool resource used in the management API
to manage a pool of addresses from which subnets can be allocated.
For demonstration purposes, the SubnetPool custom resource (CR) can be
split into the following major sections:
SubnetPool metadata¶
The SubnetPool CR contains the following fields:
apiVersionAPI version of the object that is
ipam.mirantis.com/v1alpha1.
kindObject type that is
SubnetPool.
metadataThe
metadatafield contains the following subfields:nameName of the
SubnetPoolobject.
namespaceProject in which the
SubnetPoolobject was created.
labelsKey-value pairs that are attached to the object:
kaas.mirantis.com/providerProvider type that is
baremetal.
kaas.mirantis.com/regionRegion name.
Note
The
kaas.mirantis.com/regionlabel is removed from all MOSK objects in 24.1. Therefore, do not add the label starting with this release. On existing clusters updated to this release, or if added manually, MOSK ignores this label.
Warning
Labels and annotations that are not documented in this API Reference are generated automatically. Do not modify them using the API.
Configuration example:
apiVersion: ipam.mirantis.com/v1alpha1
kind: SubnetPool
metadata:
name: kaas-mgmt
namespace: default
labels:
kaas.mirantis.com/provider: baremetal
SubnetPool spec¶
The spec field of the SubnetPool resource describes the desired state
of a subnet pool. It contains the following fields:
cidrValid IPv4 CIDR. For example, 10.10.0.0/16.
blockSizeIP address block size to use when assigning an IP address block to every new managed
Subnetobject. For example, if you set/25, every new managedSubnetwill have 128 IPs to allocate. Possible values are from/29to thecidrsize. Immutable.
nameserversOptional. List of IP addresses of name servers to use for every new managed
Subnetobject. Each element of the list is a single address, for example, 172.18.176.6. Default: empty.
gatewayPolicyOptional. Method of assigning a gateway address to new managed
Subnetobjects. Default:none. Possible values are:first- first IP of the IP address block assigned to a managedSubnet, for example, 10.11.10.1.last- last IP of the IP address block assigned to a managedSubnet, for example, 10.11.10.254.none- no gateway address.
Configuration example:
spec:
cidr: 10.10.0.0/16
blockSize: /25
nameservers:
- 172.18.176.6
gatewayPolicy: first
SubnetPool status¶
The status field of the SubnetPool resource describes the actual state
of a subnet pool. It contains the following fields:
allocatedSubnetsList of allocated subnets. Each subnet has the
<CIDR>:<SUBNET_UID>format.
blockSizeBlock size to use for IP address assignments from the defined pool.
capacityTotal number of IP addresses to be allocated. Includes the number of allocatable and already allocated IP addresses.
allocatableNumber of subnets with the
blockSizesize that are available for allocation.
stateSince MCC 2.23.0 (11.7.0)Message that reflects the current status of the resource. The list of possible values includes the following:
OK- object is operational.ERR- object is non-operational. This status has a detailed description in themessageslist.TERM- object was deleted and is terminating.
messagesSince MCC 2.23.0 (11.7.0)List of error or warning messages if the object state is
ERR.
objCreatedDate, time, and IPAM version of the resource creation.
objStatusUpdatedDate, time, and IPAM version of the last update of the
statusfield in the resource.
objUpdatedDate, time, and IPAM version of the last resource update.
Example:
status:
allocatedSubnets:
- 10.10.0.0/24:0272bfa9-19de-11eb-b591-0242ac110002
blockSize: /24
capacity: 54
allocatable: 51
objCreated: 2021-10-21T19:09:32Z by v5.1.0-20210930-121522-f5b2af8
objStatusUpdated: 2021-10-21T19:14:18.748114886Z by v5.1.0-20210930-121522-f5b2af8
objUpdated: 2021-10-21T19:09:32.606968024Z by v5.1.0-20210930-121522-f5b2af8
state: OK