This is a cache of https://docs.okd.io/4.15/machine_management/control_plane_machine_management/cpmso_provider_configurations/cpmso-config-options-openstack.html. It is a snapshot of the page at 2024-11-23T21:00:50.499+0000.
Control plane configuration options for Red Hat OpenStack Platform - Managing control plane machines | Machine management | OKD 4.15
×

You can change the configuration of your OpenStack control plane machines and enable features by updating values in the control plane machine set. When you save an update to the control plane machine set, the Control Plane Machine Set Operator updates the control plane machines according to your configured update strategy.

Sample YAML for configuring OpenStack clusters

The following example YAML snippets show provider specification and failure domain configurations for an OpenStack cluster.

Sample OpenStack provider specification

When you create a control plane machine set for an existing cluster, the provider specification must match the providerSpec configuration in the control plane machine custom resource (CR) that is created by the installation program.

Sample OpenStack providerSpec values
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
metadata:
  name: cluster
  namespace: openshift-machine-api
spec:
# ...
  template:
# ...
      spec:
        providerSpec:
          value:
            apiVersion: machine.openshift.io/v1alpha1
            cloudName: openstack
            cloudsSecret:
              name: openstack-cloud-credentials (1)
              namespace: openshift-machine-api
            flavor: m1.xlarge (2)
            image: ocp1-2g2xs-rhcos
            kind: OpenstackProviderSpec (3)
            metadata:
              creationTimestamp: null
            networks:
            - filter: {}
              subnets:
              - filter:
                  name: ocp1-2g2xs-nodes
                  tags: openshiftClusterID=ocp1-2g2xs
            securityGroups:
            - filter: {}
              name: ocp1-2g2xs-master (4)
            serverGroupName: ocp1-2g2xs-master
            serverMetadata:
              Name: ocp1-2g2xs-master
              openshiftClusterID: ocp1-2g2xs
            tags:
            - openshiftClusterID=ocp1-2g2xs
            trunk: true
            userDataSecret:
              name: master-user-data
1 The secret name for the cluster. Do not change this value.
2 The OpenStack flavor type for the control plane.
3 The OpenStack cloud provider platform type. Do not change this value.
4 The control plane machines security group.

Sample OpenStack failure domain configuration

The control plane machine set concept of a failure domain is analogous to the existing OpenStack concept of an availability zone. The ControlPlaneMachineSet CR spreads control plane machines across multiple failure domains when possible.

The following example demonstrates the use of multiple Nova availability zones as well as Cinder availability zones.

Sample OpenStack failure domain values
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
metadata:
  name: cluster
  namespace: openshift-machine-api
spec:
# ...
  template:
# ...
    machines_v1beta1_machine_openshift_io:
      failureDomains:
        platform: OpenStack
        openstack:
        - availabilityZone: nova-az0
          rootVolume:
            availabilityZone: cinder-az0
        - availabilityZone: nova-az1
          rootVolume:
            availabilityZone: cinder-az1
        - availabilityZone: nova-az2
          rootVolume:
            availabilityZone: cinder-az2
# ...

Enabling OpenStack features for control plane machines

You can enable features by updating values in the control plane machine set.

Changing the OpenStack compute flavor by using a control plane machine set

You can change the OpenStack compute service (Nova) flavor that your control plane machines use by updating the specification in the control plane machine set custom resource.

In OpenStack, flavors define the compute, memory, and storage capacity of computing instances. By increasing or decreasing the flavor size, you can scale your control plane vertically.

Prerequisites
  • Your OpenStack cluster uses a control plane machine set.

Procedure
  1. Edit the following line under the providerSpec field:

    providerSpec:
      value:
    # ...
        flavor: m1.xlarge (1)
    1 Specify a OpenStack flavor type that has the same base as the existing selection. For example, you can change m6i.xlarge to m6i.2xlarge or m6i.4xlarge. You can choose larger or smaller flavors depending on your vertical scaling needs.
  2. Save your changes.

After you save your changes, machines are replaced with ones that use the flavor you chose.