Skip to content

Commit 997ac64

Browse files
committed
[OSDOCS-2003]: AWS user-defined tags in machine sets
1 parent d9e6d1d commit 997ac64

File tree

1 file changed

+25
-18
lines changed

1 file changed

+25
-18
lines changed

modules/machineset-yaml-aws.adoc

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ ifndef::infra[]
5454
machine.openshift.io/cluster-api-machine-type: <role> <3>
5555
endif::infra[]
5656
ifdef::infra[]
57-
machine.openshift.io/cluster-api-machine-role: <infra> <3>
58-
machine.openshift.io/cluster-api-machine-type: <infra> <3>
57+
machine.openshift.io/cluster-api-machine-role: infra <3>
58+
machine.openshift.io/cluster-api-machine-type: infra <3>
5959
endif::infra[]
6060
ifndef::infra[]
6161
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role>-<zone> <2>
@@ -71,19 +71,11 @@ ifndef::infra[]
7171
endif::infra[]
7272
ifdef::infra[]
7373
node-role.kubernetes.io/infra: "" <3>
74-
taints: <4>
75-
- key: node-role.kubernetes.io/infra
76-
effect: NoSchedule
7774
endif::infra[]
7875
providerSpec:
7976
value:
8077
ami:
81-
ifndef::infra[]
8278
id: ami-046fe691f52a953f9 <4>
83-
endif::infra[]
84-
ifdef::infra[]
85-
id: ami-046fe691f52a953f9 <5>
86-
endif::infra[]
8779
apiVersion: awsproviderconfig.openshift.io/v1beta1
8880
blockDevices:
8981
- ebs:
@@ -113,8 +105,15 @@ endif::infra[]
113105
tags:
114106
- name: kubernetes.io/cluster/<infrastructure_id> <1>
115107
value: owned
108+
- name: <custom_tag_name> <5>
109+
value: <custom_tag_value> <5>
116110
userDataSecret:
117111
name: worker-user-data
112+
ifdef::infra[]
113+
taints: <6>
114+
- key: node-role.kubernetes.io/infra
115+
effect: NoSchedule
116+
endif::infra[]
118117
----
119118
<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:
120119
+
@@ -123,22 +122,30 @@ endif::infra[]
123122
$ oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructure cluster
124123
----
125124
ifndef::infra[]
126-
<2> Specify the infrastructure ID, node label, and zone.
127-
<3> Specify the node label to add.
128-
<4> Specify a valid {op-system-first} AMI for your AWS zone for your {product-title} nodes. If you want to use an AWS Marketplace image, you must complete the {product-title} subscription from the link:https://aws.amazon.com/marketplace/fulfillment?productId=59ead7de-2540-4653-a8b0-fa7926d5c845[AWS Marketplace] to obtain an AMI ID for your region.
125+
<2> Specify the infrastructure ID, role node label, and zone.
126+
<3> Specify the role node label to add.
129127
endif::infra[]
130128
ifdef::infra[]
131-
<2> Specify the infrastructure ID, `<infra>` node label, and zone.
132-
<3> Specify the `<infra>` node label.
133-
<4> Specify a taint to prevent user workloads from being scheduled on infra nodes.
134-
<5> Specify a valid {op-system-first} AMI for your AWS zone for your {product-title} nodes. If you want to use an AWS Marketplace image, you must complete the {product-title} subscription from the link:https://aws.amazon.com/marketplace/fulfillment?productId=59ead7de-2540-4653-a8b0-fa7926d5c845[AWS Marketplace] to obtain an AMI ID for your region.
129+
<2> Specify the infrastructure ID, `infra` role node label, and zone.
130+
<3> Specify the `infra` role node label.
131+
endif::infra[]
132+
<4> Specify a valid {op-system-first} Amazon
133+
Machine Image (AMI) for your AWS zone for your {product-title} nodes. If you want to use an AWS Marketplace image, you must complete the {product-title} subscription from the link:https://aws.amazon.com/marketplace/fulfillment?productId=59ead7de-2540-4653-a8b0-fa7926d5c845[AWS Marketplace] to obtain an AMI ID for your region.
135134
+
136135
[source,terminal]
137136
----
138137
$ oc -n openshift-machine-api \
139138
-o jsonpath='{.spec.template.spec.providerSpec.value.ami.id}{"\n"}' \
140-
get machineset/<infrastructure_id>-worker-<zone>
139+
get machineset/<infrastructure_id>-<role>-<zone>
141140
----
141+
<5> Optional: Specify custom tag data for your cluster. For example, you might add an admin contact email address by specifying a `name:value` pair of `Email:\[email protected]`.
142+
+
143+
[NOTE]
144+
====
145+
Custom tags can also be specified during installation in the `install-config.yml` file. If the `install-config.yml` file and the machine set include a tag with the same `name` data, the value for the tag from the machine set takes priority over the value for the tag in the `install-config.yml` file.
146+
====
147+
ifdef::infra[]
148+
<6> Specify a taint to prevent user workloads from being scheduled on infra nodes.
142149
endif::infra[]
143150

144151
ifeval::["{context}" == "creating-infrastructure-machinesets"]

0 commit comments

Comments
 (0)