github.com/openshift/installer@v1.4.17/docs/user/openstack/control-plane-machine-set.md (about)

     1  # OpenStack Control plane machine set
     2  
     3  The [cluster-control-plane-machine-set-operator](https://github.com/openshift/cluster-control-plane-machine-set-operator) manages the Control plane machines through the `ControlPlaneMachineSet` resource.
     4  
     5  The `ControlPlaneMachineSet` (CPMS) contains a template of the Control plane Machine provider Spec. The template is applied uniformly to all Control plane Machines, except for a few properties of the template can change between Machines: these variable properties are defined in the `FailureDomain` stanza of the CPMS spec.
     6  
     7  ---
     8  
     9  ## Example 1: availability zones set to the default
    10  
    11  The "default" availability zone `""` means that Nova will schedule instances ignoring availability zones. This is the default setting in OpenShift.
    12  
    13  This is the CPMS that the Installer generates for a cluster with name `ocp1-2g2xs`, for which no `zones` have been set in `install-config.yaml`:
    14  
    15  ```yaml
    16  apiVersion: machine.openshift.io/v1
    17  kind: ControlPlaneMachineSet
    18  metadata:
    19    creationTimestamp: null
    20    labels:
    21      machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
    22    name: cluster
    23    namespace: openshift-machine-api
    24  spec:
    25    replicas: 3
    26    selector:
    27      matchLabels:
    28        machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
    29        machine.openshift.io/cluster-api-machine-role: master
    30        machine.openshift.io/cluster-api-machine-type: master
    31    state: Active
    32    strategy: {}
    33    template:
    34      machineType: machines_v1beta1_machine_openshift_io
    35      machines_v1beta1_machine_openshift_io:
    36        failureDomains: # <-- Empty property
    37          platform: ""
    38        metadata:
    39          labels:
    40            machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
    41            machine.openshift.io/cluster-api-machine-role: master
    42            machine.openshift.io/cluster-api-machine-type: master
    43        spec:
    44          lifecycleHooks: {}
    45          metadata: {}
    46          providerSpec:
    47            value: # <-- The OpenStack providerSpec
    48              apiVersion: machine.openshift.io/v1alpha1
    49              cloudName: openstack
    50              cloudsSecret:
    51                name: openstack-cloud-credentials
    52                namespace: openshift-machine-api
    53              flavor: m1.xlarge
    54              image: ocp1-2g2xs-rhcos
    55              kind: OpenstackProviderSpec
    56              metadata:
    57                creationTimestamp: null
    58              networks:
    59              - filter: {}
    60                subnets:
    61                - filter:
    62                    name: ocp1-2g2xs-nodes
    63                    tags: openshiftClusterID=ocp1-2g2xs
    64              securityGroups:
    65              - filter: {}
    66                name: ocp1-2g2xs-master
    67              serverGroupName: ocp1-2g2xs-master
    68              serverMetadata:
    69                Name: ocp1-2g2xs-master
    70                openshiftClusterID: ocp1-2g2xs
    71              tags:
    72              - openshiftClusterID=ocp1-2g2xs
    73              trunk: true
    74              userDataSecret:
    75                name: master-user-data
    76  ```
    77  
    78  In this case, the `spec.template.machines_v1beta1_machine_openshift_io.failureDomains` stanza does not contain the `openstack` property.
    79  
    80  Leaving `failureDomains` without a platform value means: do not substitute the values in the `providerSpec`. In this case, the `providerSpec` does not contain the `availabilityZone` property, because it's implicitly set to the empty string.
    81  
    82  ---
    83  
    84  ## Example 2: three Compute availability zones
    85  
    86  ```yaml
    87  apiVersion: machine.openshift.io/v1
    88  kind: ControlPlaneMachineSet
    89  metadata:
    90    creationTimestamp: null
    91    labels:
    92      machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
    93    name: cluster
    94    namespace: openshift-machine-api
    95  spec:
    96    replicas: 3
    97    selector:
    98      matchLabels:
    99        machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
   100        machine.openshift.io/cluster-api-machine-role: master
   101        machine.openshift.io/cluster-api-machine-type: master
   102    state: Active
   103    strategy: {}
   104    template:
   105      machineType: machines_v1beta1_machine_openshift_io
   106      machines_v1beta1_machine_openshift_io:
   107        failureDomains:
   108          openstack:
   109          - availabilityZone: zone-one
   110          - availabilityZone: zone-two
   111          - availabilityZone: zone-three
   112          platform: OpenStack
   113        metadata:
   114          labels:
   115            machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
   116            machine.openshift.io/cluster-api-machine-role: master
   117            machine.openshift.io/cluster-api-machine-type: master
   118        spec:
   119          lifecycleHooks: {}
   120          metadata: {}
   121          providerSpec:
   122            value: # <-- The OpenStack providerSpec
   123              apiVersion: machine.openshift.io/v1alpha1
   124              cloudName: openstack
   125              cloudsSecret:
   126                name: openstack-cloud-credentials
   127                namespace: openshift-machine-api
   128              flavor: m1.xlarge
   129              image: ocp1-2g2xs-rhcos
   130              kind: OpenstackProviderSpec
   131              metadata:
   132                creationTimestamp: null
   133              networks:
   134              - filter: {}
   135                subnets:
   136                - filter:
   137                    name: ocp1-2g2xs-nodes
   138                    tags: openshiftClusterID=ocp1-2g2xs
   139              securityGroups:
   140              - filter: {}
   141                name: ocp1-2g2xs-master
   142              serverGroupName: ocp1-2g2xs-master
   143              serverMetadata:
   144                Name: ocp1-2g2xs-master
   145                openshiftClusterID: ocp1-2g2xs
   146              tags:
   147              - openshiftClusterID=ocp1-2g2xs
   148              trunk: true
   149              userDataSecret:
   150                name: master-user-data
   151  ```
   152  
   153  When reconciling the Machines, cluster-control-plane-machine-set-operator will match their spec against the template, after substituting the `availabilityZone` properties for each of them.
   154  
   155  The three Control plane Machines will each be provisioned on a different availability zone.
   156  
   157  ---
   158  
   159  ## Example 3: three Storage availability zones
   160  
   161  The storage availability zones apply to the root volume. The `providerSpec` must contain a `rootVolume` property.
   162  
   163  ```yaml
   164  apiVersion: machine.openshift.io/v1
   165  kind: ControlPlaneMachineSet
   166  metadata:
   167    creationTimestamp: null
   168    labels:
   169      machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
   170    name: cluster
   171    namespace: openshift-machine-api
   172  spec:
   173    replicas: 3
   174    selector:
   175      matchLabels:
   176        machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
   177        machine.openshift.io/cluster-api-machine-role: master
   178        machine.openshift.io/cluster-api-machine-type: master
   179    state: Active
   180    strategy: {}
   181    template:
   182      machineType: machines_v1beta1_machine_openshift_io
   183      machines_v1beta1_machine_openshift_io:
   184        failureDomains:
   185          openstack:
   186          - rootVolume:
   187              availabilityZone: cinder-one
   188          - rootVolume:
   189              availabilityZone: cinder-two
   190          - rootVolume:
   191              availabilityZone: cinder-three
   192          platform: OpenStack
   193        metadata:
   194          labels:
   195            machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
   196            machine.openshift.io/cluster-api-machine-role: master
   197            machine.openshift.io/cluster-api-machine-type: master
   198        spec:
   199          lifecycleHooks: {}
   200          metadata: {}
   201          providerSpec:
   202            value: # <-- The OpenStack providerSpec
   203              apiVersion: machine.openshift.io/v1alpha1
   204              cloudName: openstack
   205              cloudsSecret:
   206                name: openstack-cloud-credentials
   207                namespace: openshift-machine-api
   208              flavor: m1.xlarge
   209              image: ocp1-2g2xs-rhcos
   210              kind: OpenstackProviderSpec
   211              metadata:
   212                creationTimestamp: null
   213              networks:
   214              - filter: {}
   215                subnets:
   216                - filter:
   217                    name: ocp1-2g2xs-nodes
   218                    tags: openshiftClusterID=ocp1-2g2xs
   219              rootVolume:
   220                diskSize: 30
   221                volumeType: performance
   222              securityGroups:
   223              - filter: {}
   224                name: ocp1-2g2xs-master
   225              serverGroupName: ocp1-2g2xs-master
   226              serverMetadata:
   227                Name: ocp1-2g2xs-master
   228                openshiftClusterID: ocp1-2g2xs
   229              tags:
   230              - openshiftClusterID=ocp1-2g2xs
   231              trunk: true
   232              userDataSecret:
   233                name: master-user-data
   234  ```
   235  
   236  When reconciling the Machines, cluster-control-plane-machine-set-operator will match their spec against the template, after substituting the `availabilityZone` property of the `rootVolume` for each of them.
   237  
   238  The three Control plane Machines will each have their `rootVolume` provisioned on a different availability zone.
   239  
   240  ---
   241  
   242  ## Example 4: three Compute availability zones, three Storage availability zones
   243  
   244  The storage availability zones apply to the root volume. The `providerSpec` must contain a `rootVolume` property.
   245  
   246  ```yaml
   247  apiVersion: machine.openshift.io/v1
   248  kind: ControlPlaneMachineSet
   249  metadata:
   250    creationTimestamp: null
   251    labels:
   252      machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
   253    name: cluster
   254    namespace: openshift-machine-api
   255  spec:
   256    replicas: 3
   257    selector:
   258      matchLabels:
   259        machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
   260        machine.openshift.io/cluster-api-machine-role: master
   261        machine.openshift.io/cluster-api-machine-type: master
   262    state: Active
   263    strategy: {}
   264    template:
   265      machineType: machines_v1beta1_machine_openshift_io
   266      machines_v1beta1_machine_openshift_io:
   267        failureDomains:
   268          openstack:
   269          - availabilityZone: nova-one
   270            rootVolume:
   271              availabilityZone: cinder-one
   272          - availabilityZone: nova-two
   273            rootVolume:
   274              availabilityZone: cinder-two
   275          - availabilityZone: nova-three
   276            rootVolume:
   277              availabilityZone: cinder-three
   278          platform: OpenStack
   279        metadata:
   280          labels:
   281            machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
   282            machine.openshift.io/cluster-api-machine-role: master
   283            machine.openshift.io/cluster-api-machine-type: master
   284        spec:
   285          lifecycleHooks: {}
   286          metadata: {}
   287          providerSpec:
   288            value: # <-- The OpenStack providerSpec
   289              apiVersion: machine.openshift.io/v1alpha1
   290              cloudName: openstack
   291              cloudsSecret:
   292                name: openstack-cloud-credentials
   293                namespace: openshift-machine-api
   294              flavor: m1.xlarge
   295              image: ocp1-2g2xs-rhcos
   296              kind: OpenstackProviderSpec
   297              metadata:
   298                creationTimestamp: null
   299              networks:
   300              - filter: {}
   301                subnets:
   302                - filter:
   303                    name: ocp1-2g2xs-nodes
   304                    tags: openshiftClusterID=ocp1-2g2xs
   305              rootVolume:
   306                diskSize: 30
   307                volumeType: performance
   308              securityGroups:
   309              - filter: {}
   310                name: ocp1-2g2xs-master
   311              serverGroupName: ocp1-2g2xs-master
   312              serverMetadata:
   313                Name: ocp1-2g2xs-master
   314                openshiftClusterID: ocp1-2g2xs
   315              tags:
   316              - openshiftClusterID=ocp1-2g2xs
   317              trunk: true
   318              userDataSecret:
   319                name: master-user-data
   320  ```
   321  
   322  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.
   323  
   324  The three Control plane Machines will all be provisioned on a different availability zone and have their `rootVolume` provisioned on a different availability zone.
   325  
   326  ---
   327  
   328  ## Example 5: three Compute availability zones, three Storage types
   329  
   330  The storage types apply to the root volume. The `providerSpec` must contain a `rootVolume` property.
   331  
   332  ```yaml
   333  apiVersion: machine.openshift.io/v1
   334  kind: ControlPlaneMachineSet
   335  metadata:
   336    creationTimestamp: null
   337    labels:
   338      machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
   339    name: cluster
   340    namespace: openshift-machine-api
   341  spec:
   342    replicas: 3
   343    selector:
   344      matchLabels:
   345        machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
   346        machine.openshift.io/cluster-api-machine-role: master
   347        machine.openshift.io/cluster-api-machine-type: master
   348    state: Active
   349    strategy: {}
   350    template:
   351      machineType: machines_v1beta1_machine_openshift_io
   352      machines_v1beta1_machine_openshift_io:
   353        failureDomains:
   354          openstack:
   355          - availabilityZone: nova-one
   356            rootVolume:
   357              volumeType: fastpool-1
   358          - availabilityZone: nova-two
   359            rootVolume:
   360              volumeType: fastpool-2
   361          - availabilityZone: nova-three
   362            rootVolume:
   363              volumeType: fastpool-3
   364          platform: OpenStack
   365        metadata:
   366          labels:
   367            machine.openshift.io/cluster-api-cluster: ocp1-2g2xs
   368            machine.openshift.io/cluster-api-machine-role: master
   369            machine.openshift.io/cluster-api-machine-type: master
   370        spec:
   371          lifecycleHooks: {}
   372          metadata: {}
   373          providerSpec:
   374            value: # <-- The OpenStack providerSpec
   375              apiVersion: machine.openshift.io/v1alpha1
   376              cloudName: openstack
   377              cloudsSecret:
   378                name: openstack-cloud-credentials
   379                namespace: openshift-machine-api
   380              flavor: m1.xlarge
   381              image: ocp1-2g2xs-rhcos
   382              kind: OpenstackProviderSpec
   383              metadata:
   384                creationTimestamp: null
   385              networks:
   386              - filter: {}
   387                subnets:
   388                - filter:
   389                    name: ocp1-2g2xs-nodes
   390                    tags: openshiftClusterID=ocp1-2g2xs
   391              rootVolume:
   392                diskSize: 30
   393              securityGroups:
   394              - filter: {}
   395                name: ocp1-2g2xs-master
   396              serverGroupName: ocp1-2g2xs-master
   397              serverMetadata:
   398                Name: ocp1-2g2xs-master
   399                openshiftClusterID: ocp1-2g2xs
   400              tags:
   401              - openshiftClusterID=ocp1-2g2xs
   402              trunk: true
   403              userDataSecret:
   404                name: master-user-data
   405  ```
   406  
   407  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.
   408  
   409  The three Control plane Machines will all be provisioned on a different availability zone and have their `rootVolume` provisioned with a different volume type.