mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 15:47:14 +01:00
openstack: Variable Root volume types
Co-Authored-By: Emilien Macchi <emilien@redhat.com> Co-Authored-By: Pierre Prinetti <pierreprinetti@redhat.com>
This commit is contained in:
@@ -322,3 +322,88 @@ spec:
|
||||
When reconciling the Machines, cluster-control-plane-machine-set-operator will match their spec against the template, after substituting `availabilityZone` and `rootVolume.availabilityZone` for each of them.
|
||||
|
||||
The three Control plane Machines will all be provisioned on a different availability zone and have their `rootVolume` provisioned on a different availability zone.
|
||||
|
||||
---
|
||||
|
||||
## Example 5: three Compute availability zones, three Storage types
|
||||
|
||||
The storage types apply to the root volume. The `providerSpec` must contain a `rootVolume` property.
|
||||
|
||||
```yaml
|
||||
apiVersion: machine.openshift.io/v1
|
||||
kind: ControlPlaneMachineSet
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
|
||||
name: cluster
|
||||
namespace: openshift-machine-api
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
|
||||
machine.openshift.io/cluster-api-machine-role: master
|
||||
machine.openshift.io/cluster-api-machine-type: master
|
||||
state: Active
|
||||
strategy: {}
|
||||
template:
|
||||
machineType: machines_v1beta1_machine_openshift_io
|
||||
machines_v1beta1_machine_openshift_io:
|
||||
failureDomains:
|
||||
openstack:
|
||||
- availabilityZone: nova-one
|
||||
rootVolume:
|
||||
volumeType: fastpool-1
|
||||
- availabilityZone: nova-two
|
||||
rootVolume:
|
||||
volumeType: fastpool-2
|
||||
- availabilityZone: nova-three
|
||||
rootVolume:
|
||||
volumeType: fastpool-3
|
||||
platform: OpenStack
|
||||
metadata:
|
||||
labels:
|
||||
machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
|
||||
machine.openshift.io/cluster-api-machine-role: master
|
||||
machine.openshift.io/cluster-api-machine-type: master
|
||||
spec:
|
||||
lifecycleHooks: {}
|
||||
metadata: {}
|
||||
providerSpec:
|
||||
value: # <-- The OpenStack providerSpec
|
||||
apiVersion: machine.openshift.io/v1alpha1
|
||||
cloudName: openstack
|
||||
cloudsSecret:
|
||||
name: openstack-cloud-credentials
|
||||
namespace: openshift-machine-api
|
||||
flavor: m1.xlarge
|
||||
image: ocp1-2g2xs-rhcos
|
||||
kind: OpenstackProviderSpec
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
networks:
|
||||
- filter: {}
|
||||
subnets:
|
||||
- filter:
|
||||
name: ocp1-2g2xs-nodes
|
||||
tags: openshiftClusterID=ocp1-2g2xs
|
||||
rootVolume:
|
||||
diskSize: 30
|
||||
securityGroups:
|
||||
- filter: {}
|
||||
name: ocp1-2g2xs-master
|
||||
serverGroupName: ocp1-2g2xs-master
|
||||
serverMetadata:
|
||||
Name: ocp1-2g2xs-master
|
||||
openshiftClusterID: ocp1-2g2xs
|
||||
tags:
|
||||
- openshiftClusterID=ocp1-2g2xs
|
||||
trunk: true
|
||||
userDataSecret:
|
||||
name: master-user-data
|
||||
```
|
||||
|
||||
When reconciling the Machines, cluster-control-plane-machine-set-operator will match their spec against the template, after substituting `availabilityZone` and `rootVolume.volumeType` for each of them.
|
||||
|
||||
The three Control plane Machines will all be provisioned on a different availability zone and have their `rootVolume` provisioned with a different volume type.
|
||||
@@ -47,7 +47,8 @@ Beyond the [platform-agnostic `install-config.yaml` properties](../customization
|
||||
* `type` (optional string): The OpenStack flavor name for machines in the pool.
|
||||
* `rootVolume` (optional object): Defines the root volume for instances in the machine pool. The instances use ephemeral disks if not set.
|
||||
* `size` (required integer): Size of the root volume in GB. Must be set to at least 25.
|
||||
* `type` (required string): The volume pool to create the volume from.
|
||||
* `type` (optional string): The volume pool to create the volume from. It was replaced by `types`.
|
||||
* `types` (required list of strings): The volume pool to create the volume from. If compute `zones` are defined with more than one type, the number of zones must match the number of types.
|
||||
* `zones` (optional list of strings): The names of the availability zones you want to install your root volumes on. If unset, the installer will use your default volume zone.
|
||||
If compute `zones` contains at least one value, `rootVolume.zones` must also contain at least one value.
|
||||
Indeed, when a machine is created with a compute availability zone and a storage root volume with no specified rootVolume.availabilityZone, [CAPO](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/9d183bd479fe9aed4f6e7ac3d5eee46681c518e7/pkg/cloud/services/compute/instance.go#L439-L442) will use the compute AZ for the volume AZ.
|
||||
@@ -106,7 +107,8 @@ compute:
|
||||
type: ml.large
|
||||
rootVolume:
|
||||
size: 30
|
||||
type: performance
|
||||
types:
|
||||
- performance
|
||||
replicas: 3
|
||||
metadata:
|
||||
name: test-cluster
|
||||
|
||||
Reference in New Issue
Block a user