Skip to content

Reconcile machineset platform differences #30093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
6 changes: 4 additions & 2 deletions modules/machineset-yaml-aws.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[id="machineset-yaml-aws_{context}"]
= Sample YAML for a machine set custom resource on AWS

This sample YAML defines a machine set that runs in the `us-east-1a` Amazon Web Services (AWS) zone and creates nodes that are labeled with `node-role.kubernetes.io/<role>: ""`
This sample YAML defines a machine set that runs in the `us-east-1a` Amazon Web Services (AWS) zone and creates nodes that are labeled with `node-role.kubernetes.io/<role>: ""`.

In this sample, `<infrastructureID>` is the infrastructure ID label that is based on the cluster ID that you set when you provisioned the cluster, and `<role>` is the node label to add.

Expand All @@ -18,10 +18,12 @@ kind: MachineSet
metadata:
labels:
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
machine.openshift.io/cluster-api-machine-role: <role>
machine.openshift.io/cluster-api-machine-type: <role>
name: <infrastructureID>-<role>-<zone> <2>
namespace: openshift-machine-api
spec:
replicas: 1
replicas: <number_of_replicas>
selector:
matchLabels:
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
Expand Down
8 changes: 2 additions & 6 deletions modules/machineset-yaml-azure.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,20 @@ metadata:
name: <infrastructureID>-<role>-<region> <3>
namespace: openshift-machine-api
spec:
replicas: 1
replicas: <number_of_replicas>
selector:
matchLabels:
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
machine.openshift.io/cluster-api-machineset: <infrastructureID>-<role>-<region> <3>
template:
metadata:
creationTimestamp: null
labels:
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
machine.openshift.io/cluster-api-machine-role: <role> <2>
machine.openshift.io/cluster-api-machine-type: <role> <2>
machine.openshift.io/cluster-api-machineset: <infrastructureID>-<role>-<region> <3>
spec:
metadata:
creationTimestamp: null
labels:
node-role.kubernetes.io/<role>: "" <2>
providerSpec:
Expand All @@ -57,8 +55,6 @@ spec:
kind: AzureMachineProviderSpec
location: centralus
managedIdentity: <infrastructureID>-identity <1>
metadata:
creationTimestamp: null
natRule: null
networkResourceGroup: ""
osDisk:
Expand All @@ -73,7 +69,7 @@ spec:
sshPublicKey: ""
subnet: <infrastructureID>-<role>-subnet <1> <2>
userDataSecret:
name: <role>-user-data <2>
name: worker-user-data
vmSize: Standard_D2s_v3
vnet: <infrastructureID>-vnet <1>
zone: "1" <4>
Expand Down
11 changes: 5 additions & 6 deletions modules/machineset-yaml-gcp.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[id="machineset-yaml-gcp_{context}"]
= Sample YAML for a machine set custom resource on GCP

This sample YAML defines a machine set that runs in Google Cloud Platform (GCP) and creates nodes that are labeled with `node-role.kubernetes.io/<role>: ""`
This sample YAML defines a machine set that runs in Google Cloud Platform (GCP) and creates nodes that are labeled with `node-role.kubernetes.io/<role>: ""`.

In this sample, `<infrastructureID>` is the infrastructure ID label that is based on the cluster ID that you set when you provisioned the cluster, and `<role>` is the node label to add.

Expand All @@ -18,17 +18,18 @@ kind: MachineSet
metadata:
labels:
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
name: <infrastructureID>-w-a <1>
machine.openshift.io/cluster-api-machine-role: <role>
machine.openshift.io/cluster-api-machine-type: <role>
name: <infrastructureID>-<role>-w-a <1>
namespace: openshift-machine-api
spec:
replicas: 1
replicas: <number_of_replicas>
selector:
matchLabels:
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
machine.openshift.io/cluster-api-machineset: <infrastructureID>-w-a <1>
template:
metadata:
creationTimestamp: null
labels:
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
machine.openshift.io/cluster-api-machine-role: <role> <3>
Expand All @@ -54,8 +55,6 @@ spec:
type: pd-ssd
kind: GCPMachineProviderSpec
machineType: n1-standard-4
metadata:
creationTimestamp: null
networkInterfaces:
- network: <infrastructureID>-network <1>
subnetwork: <infrastructureID>-<role>-subnet <2>
Expand Down
41 changes: 22 additions & 19 deletions modules/machineset-yaml-osp.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,38 @@
[id="machineset-yaml-osp_{context}"]
= Sample YAML for a machine set custom resource on {rh-openstack}

This sample YAML defines a machine set that runs on {rh-openstack-first} and creates nodes that are labeled with `node-role.openshift.io/<node_role>: ""`
This sample YAML defines a machine set that runs on {rh-openstack-first} and creates nodes that are labeled with `node-role.openshift.io/<role>: ""`.

In this sample, `infrastructure_ID` is the infrastructure ID label that is based on the cluster ID that you set when you provisioned the cluster, and `node_role` is the node label to add.
In this sample, `<infrastructureID>` is the infrastructure ID label that is based on the cluster ID that you set when you provisioned the cluster, and `<role>` is the node label to add.

[source,yaml]
----
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
labels:
machine.openshift.io/cluster-api-cluster: <infrastructure_ID> <1>
machine.openshift.io/cluster-api-machine-role: <node_role> <2>
machine.openshift.io/cluster-api-machine-type: <node_role> <2>
name: <infrastructure_ID>-<node_role> <3>
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
machine.openshift.io/cluster-api-machine-role: <role> <2>
machine.openshift.io/cluster-api-machine-type: <role> <2>
name: <infrastructureID>-<role> <3>
namespace: openshift-machine-api
spec:
replicas: <number_of_replicas>
selector:
matchLabels:
machine.openshift.io/cluster-api-cluster: <infrastructure_ID> <1>
machine.openshift.io/cluster-api-machineset: <infrastructure_ID>-<node_role> <3>
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
machine.openshift.io/cluster-api-machineset: <infrastructureID>-<role> <3>
template:
metadata:
labels:
machine.openshift.io/cluster-api-cluster: <infrastructure_ID> <1>
machine.openshift.io/cluster-api-machine-role: <node_role> <2>
machine.openshift.io/cluster-api-machine-type: <node_role> <2>
machine.openshift.io/cluster-api-machineset: <infrastructure_ID>-<node_role> <3>
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
machine.openshift.io/cluster-api-machine-role: <role> <2>
machine.openshift.io/cluster-api-machine-type: <role> <2>
machine.openshift.io/cluster-api-machineset: <infrastructureID>-<role> <3>
spec:
metadata:
labels:
node-role.kubernetes.io/<role>: "" <2>
providerSpec:
value:
apiVersion: openstackproviderconfig.openshift.io/v1alpha1
Expand All @@ -51,19 +54,19 @@ spec:
subnets:
- filter:
name: <subnet_name>
tags: openshiftClusterID=<infrastructure_ID>
tags: openshiftClusterID=<infrastructureID>
primarySubnet: <rhosp_subnet_UUID> <6>
securityGroups:
- filter: {}
name: <infrastructure_ID>-<node_role>
name: <infrastructureID>-<role>
serverMetadata:
Name: <infrastructure_ID>-<node_role>
openshiftClusterID: <infrastructure_ID>
Name: <infrastructureID>-<role>
openshiftClusterID: <infrastructureID>
tags:
- openshiftClusterID=<infrastructure_ID>
- openshiftClusterID=<infrastructureID>
trunk: true
userDataSecret:
name: <node_role>-user-data <2>
name: worker-user-data
availabilityZone: <optional_openstack_availability_zone>
----
<1> Specify the infrastructure ID that is based on the cluster ID that you set when you provisioned the cluster. If you have the OpenShift CLI installed, you can obtain the infrastructure ID by running the following command:
Expand All @@ -77,4 +80,4 @@ $ oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructure cluster
<4> To set a server group policy for the MachineSet, enter the value that is returned from
link:https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.0/html/command_line_interface_reference/server#server_group_create[creating a server group]. For most deployments, `anti-affinity` or `soft-anti-affinity` policies are recommended.
<5> Required for deployments to multiple networks. If deploying to multiple networks, this list must include the network that is used as the `primarySubnet` value.
<6> Specify the {rh-openstack} subnet that you want the endpoints of nodes to be published on. Usually, this is the same subnet that is used as the value of `machinesSubnet` in the `install-config.yaml` file.
<6> Specify the {rh-openstack} subnet that you want the endpoints of nodes to be published on. Usually, this is the same subnet that is used as the value of `machinesSubnet` in the `install-config.yaml` file.
18 changes: 9 additions & 9 deletions modules/machineset-yaml-rhv.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,34 @@
[id="machineset-yaml-rhv_{context}"]
= Sample YAML for a machine set custom resource on {rh-virtualization}

This sample YAML defines a machine set that runs on {rh-virtualization} and creates nodes that are labeled with `node-role.kubernetes.io/<node_role>: ""`.
This sample YAML defines a machine set that runs on {rh-virtualization} and creates nodes that are labeled with `node-role.kubernetes.io/<role>: ""`.

In this sample, `<infrastructure_id>` is the infrastructure ID label that is based on the cluster ID that you set when you provisioned the cluster, and `<role>` is the node label to add.
In this sample, `<infrastructureID>` is the infrastructure ID label that is based on the cluster ID that you set when you provisioned the cluster, and `<role>` is the node label to add.

[source,yaml,subs="+quotes"]
----
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
labels:
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
machine.openshift.io/cluster-api-machine-role: <role> <2>
machine.openshift.io/cluster-api-machine-type: <role> <2>
name: <infrastructure_id>-<role> <3>
name: <infrastructureID>-<role> <3>
namespace: openshift-machine-api
spec:
replicas: <number_of_replicas> <4>
Selector: <5>
selector: <5>
matchLabels:
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role> <3>
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
machine.openshift.io/cluster-api-machineset: <infrastructureID>-<role> <3>
template:
metadata:
labels:
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
machine.openshift.io/cluster-api-machine-role: <role> <2>
machine.openshift.io/cluster-api-machine-type: <role> <2>
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role> <3>
machine.openshift.io/cluster-api-machineset: <infrastructureID>-<role> <3>
spec:
metadata:
labels:
Expand Down
23 changes: 10 additions & 13 deletions modules/machineset-yaml-vsphere.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,34 @@

This sample YAML defines a machine set that runs on VMware vSphere and creates nodes that are labeled with `node-role.kubernetes.io/<role>: ""`.

In this sample, `<infrastructure_id>` is the infrastructure ID label that is based on the cluster ID that you set when you provisioned the cluster, and `<role>` is the node label to add.
In this sample, `<infrastructureID>` is the infrastructure ID label that is based on the cluster ID that you set when you provisioned the cluster, and `<role>` is the node label to add.

[source,yaml]
----
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
creationTimestamp: null
labels:
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
name: <infrastructure_id>-<role> <2>
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
machine.openshift.io/cluster-api-machine-role: <role>
machine.openshift.io/cluster-api-machine-type: <role>
name: <infrastructureID>-<role> <2>
namespace: openshift-machine-api
spec:
replicas: 1
replicas: <number_of_replicas>
selector:
matchLabels:
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role> <2>
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
machine.openshift.io/cluster-api-machineset: <infrastructureID>-<role> <2>
template:
metadata:
creationTimestamp: null
labels:
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
machine.openshift.io/cluster-api-cluster: <infrastructureID> <1>
machine.openshift.io/cluster-api-machine-role: <role> <3>
machine.openshift.io/cluster-api-machine-type: <role> <3>
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role> <2>
machine.openshift.io/cluster-api-machineset: <infrastructureID>-<role> <2>
spec:
metadata:
creationTimestamp: null
labels:
node-role.kubernetes.io/<role>: "" <3>
providerSpec:
Expand All @@ -48,8 +47,6 @@ spec:
diskGiB: 120
kind: VSphereMachineProviderSpec
memoryMiB: 8192
metadata:
creationTimestamp: null
network:
devices:
- networkName: "<vm_network_name>" <4>
Expand Down