|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * machine_management/cluster_api_machine_management/cluster_api_provider_configurations/cluster-api-config-options-rhosp.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: REFERENCE |
| 6 | +[id="capi-yaml-machine-set-rhosp_{context}"] |
| 7 | += Sample YAML for a Cluster API compute machine set resource on {rh-openstack} |
| 8 | + |
| 9 | +The compute machine set resource defines additional properties of the machines that it creates. |
| 10 | +The compute machine set also references the infrastructure resource and machine template when creating machines. |
| 11 | + |
| 12 | +[source,yaml] |
| 13 | +---- |
| 14 | +apiVersion: cluster.x-k8s.io/v1beta1 |
| 15 | +kind: MachineSet |
| 16 | +metadata: |
| 17 | + name: <machine_set_name> # <1> |
| 18 | + namespace: openshift-cluster-api |
| 19 | +spec: |
| 20 | + clusterName: <cluster_name> # <2> |
| 21 | + replicas: 1 |
| 22 | + selector: |
| 23 | + matchLabels: |
| 24 | + test: example |
| 25 | + cluster.x-k8s.io/cluster-name: <cluster_name> |
| 26 | + cluster.x-k8s.io/set-name: <machine_set_name> |
| 27 | + template: |
| 28 | + metadata: |
| 29 | + labels: |
| 30 | + test: example |
| 31 | + cluster.x-k8s.io/cluster-name: <cluster_name> |
| 32 | + cluster.x-k8s.io/set-name: <machine_set_name> |
| 33 | + node-role.kubernetes.io/<role>: "" |
| 34 | + spec: |
| 35 | + bootstrap: |
| 36 | + dataSecretName: worker-user-data # <3> |
| 37 | + clusterName: <cluster_name> |
| 38 | + infrastructureRef: |
| 39 | + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 |
| 40 | + kind: OpenStackMachineTemplate # <4> |
| 41 | + name: <template_name> # <5> |
| 42 | + failureDomain: <nova_availability_zone> # <6> |
| 43 | +---- |
| 44 | +<1> Specify a name for the compute machine set. |
| 45 | +<2> Specify the cluster ID as the name of the cluster. |
| 46 | +<3> For the Cluster API Technology Preview, the Operator can use the worker user data secret from the `openshift-machine-api` namespace. |
| 47 | +<4> Specify the machine template kind. |
| 48 | +This value must match the value for your platform. |
| 49 | +<5> Specify the machine template name. |
| 50 | +<6> Optional: Specify the name of the Nova availability zone for the machine set to create machines in. |
| 51 | +If you do not specify a value, machines are not restricted to a specific availability zone. |
0 commit comments