Skip to content

Commit

Permalink
OSASINFRA-3061 - OpenStackFailureDomain for CPMS
Browse files Browse the repository at this point in the history
This implements the failure domain information for the
OpenStack platform.
  • Loading branch information
EmilienM committed Jun 6, 2023
1 parent 6a9f31b commit fe46f41
Show file tree
Hide file tree
Showing 7 changed files with 655 additions and 10 deletions.
27 changes: 27 additions & 0 deletions machine/v1/0000_10_controlplanemachineset.crd.yaml
Expand Up @@ -243,6 +243,31 @@ spec:
zone:
description: Zone is the zone in which the GCP machine provider will create the VM.
type: string
openstack:
description: OpenStack configures failure domain information for the OpenStack platform.
type: array
items:
description: OpenStackFailureDomain configures failure domain information for the OpenStack platform.
type: object
minProperties: 1
properties:
availabilityZone:
description: 'availabilityZone is the nova availability zone in which the OpenStack machine provider will create the VM. If not specified, the VM will be created in the default availability zone specified in the nova configuration. Availability zone names must NOT contain : since it is used by admin users to specify hosts where instances are launched in server creation. Also, it must not contain spaces otherwise it will lead to node that belongs to this availability zone register failure, see kubernetes/cloud-provider-openstack#1379 for further information. The maximum length of availability zone name is 63 as per labels limits.'
type: string
maxLength: 63
minLength: 1
pattern: '^[^: ]*$'
rootVolume:
description: rootVolume contains settings that will be used by the OpenStack machine provider to create the root volume attached to the VM. If not specified, no root volume will be created.
type: object
minProperties: 1
properties:
availabilityZone:
description: availabilityZone specifies the Cinder availability zone where the root volume will be created. If not specifified, the root volume will be created in the availability zone specified by the volume type in the cinder configuration. If the volume type (configured in the OpenStack cluster) does not specify an availability zone, the root volume will be created in the default availability zone specified in the cinder configuration. See https://docs.openstack.org/cinder/latest/admin/availability-zone-type.html for more details. If the OpenStack cluster is deployed with the cross_az_attach configuration option set to false, the root volume will have to be in the same availability zone as the VM (defined by OpenStackFailureDomain.AvailabilityZone). Availability zone names must NOT contain spaces otherwise it will lead to volume that belongs to this availability zone register failure, see kubernetes/cloud-provider-openstack#1379 for further information. The maximum length of availability zone name is 63 as per labels limits.
type: string
maxLength: 63
minLength: 1
pattern: ^[^ ]*$
platform:
description: Platform identifies the platform for which the FailureDomain represents. Currently supported values are AWS, Azure, and GCP.
type: string
Expand Down Expand Up @@ -271,6 +296,8 @@ spec:
message: azure configuration is required when platform is Azure, and forbidden otherwise
- rule: 'has(self.platform) && self.platform == ''GCP'' ? has(self.gcp) : !has(self.gcp)'
message: gcp configuration is required when platform is GCP, and forbidden otherwise
- rule: 'has(self.platform) && self.platform == ''OpenStack'' ? has(self.openstack) : !has(self.openstack)'
message: openstack configuration is required when platform is OpenStack, and forbidden otherwise
metadata:
description: 'ObjectMeta is the standard object metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Labels are required to match the ControlPlaneMachineSet selector.'
type: object
Expand Down

0 comments on commit fe46f41

Please sign in to comment.