Skip to content

Commit

Permalink
OpenStack support in CPMS
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilienM committed Apr 18, 2023
1 parent 23e32ae commit 2add629
Show file tree
Hide file tree
Showing 12 changed files with 1,460 additions and 4 deletions.
28 changes: 28 additions & 0 deletions docs/user/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,31 @@ failureDomains:

> Note: The `targetPools` field may not be set on the GCP providerSpec. This field is required for control
plane machines and you should populate this on both the Machine and the ControlPlaneMachineSet resource specs.

#### Configuring a control plane machine set on OpenStack

Two fields are supported for now: `computeAvailabilityZone` (instance AZ) and `storageAvailabilityZone` (root volume AZ).
Gather the existing control plane machines and note the value of the zones of each if they exist.
Aside from these fields, the remaining in spec the machines should be identical.

Copy the value from one of the machines into the `providerSpec.value` (6) on the example above.
Remove the AZ fields from the `providerSpec.value` once you have done that.

For each AZ you have in the cluster (normally 3), configure a failure domain like below:
```yaml
- computeAvailabilityZone: "<zone>"
storageAvailabilityZone: "<zone>"
```

With these zones, the complete `failureDomains` (3 and 4) on the example above should look something like below:
```yaml
failureDomains:
platform: OpenStack
openstack:
- computeAvailabilityZone: "us-central1-a"
storageAvailabilityZone: "us-central1-a"
- computeAvailabilityZone: "us-central1-b"
storageAvailabilityZone: "us-central1-b"
- computeAvailabilityZone: "us-central1-c"
storageAvailabilityZone: "us-central1-c"
```
5 changes: 5 additions & 0 deletions pkg/controllers/controlplanemachinesetgenerator/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ func (r *ControlPlaneMachineSetGeneratorReconciler) generateControlPlaneMachineS
if err != nil {
return nil, fmt.Errorf("unable to generate control plane machine set spec: %w", err)
}
case configv1.OpenStackPlatformType:
cpmsSpecApplyConfig, err = generateControlPlaneMachineSetOpenStackSpec(machines, machineSets)
if err != nil {
return nil, fmt.Errorf("unable to generate control plane machine set spec: %w", err)
}
default:
logger.V(1).WithValues("platform", platformType).Info(unsupportedPlatform)
return nil, errUnsupportedPlatform
Expand Down
Loading

0 comments on commit 2add629

Please sign in to comment.