You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -22,6 +27,7 @@ The Operator Management state is set by adjusting the default Tuned CR. By defau
22
27
23
28
The `profile:` section lists TuneD profiles and their names.
24
29
30
+
ifndef::rosa-hcp-tuning[]
25
31
[source,yaml]
26
32
----
27
33
profile:
@@ -45,21 +51,54 @@ profile:
45
51
46
52
# tuned_profile_n profile settings
47
53
----
54
+
endif::rosa-hcp-tuning[]
55
+
ifdef::rosa-hcp-tuning[]
56
+
[source,json]
57
+
----
58
+
{
59
+
"profile": [
60
+
{
61
+
"name": "tuned_profile_1",
62
+
"data": "# TuneD profile specification\n[main]\nsummary=Description of tuned_profile_1 profile\n\n[sysctl]\nnet.ipv4.ip_forward=1\n# ... other sysctl's or other TuneD daemon plugins supported by the containerized TuneD\n"
The `profile:` selection logic is defined by the `recommend:` section of the CR. The `recommend:` section is a list of items to recommend the profiles based on a selection criteria.
52
76
77
+
ifndef::rosa-hcp-tuning[]
53
78
[source,yaml]
54
79
----
55
80
recommend:
56
81
<recommend-item-1>
57
82
# ...
58
83
<recommend-item-n>
59
84
----
85
+
endif::rosa-hcp-tuning[]
86
+
ifdef::rosa-hcp-tuning[]
87
+
[source,json]
88
+
----
89
+
"recommend": [
90
+
{
91
+
"recommend-item-1": details_of_recommendation,
92
+
# ...
93
+
"recommend-item-n": details_of_recommendation,
94
+
}
95
+
]
96
+
----
97
+
endif::[]
60
98
61
99
The individual items of the list:
62
100
101
+
ifndef::rosa-hcp-tuning[]
63
102
[source,yaml]
64
103
----
65
104
- machineConfigLabels: <1>
@@ -82,9 +121,41 @@ The individual items of the list:
82
121
<7> Optional operand configuration.
83
122
<8> Turn debugging on or off for the TuneD daemon. Options are `true` for on or `false` for off. The default is `false`.
84
123
<9> Turn `reapply_sysctl` functionality on or off for the TuneD daemon. Options are `true` for on and `false` for off.
<1> Profile ordering priority. Lower numbers mean higher priority (`0` is the highest priority).
150
+
<1> A TuneD profile to apply on a match. For example `tuned_profile_1`.
151
+
<1> Optional: A dictionary of key-value pairs `MachineConfig` labels. The keys must be unique.
152
+
<1> If omitted, profile match is assumed unless a profile with a higher priority matches first or `machineConfigLabels` is set.
153
+
<1> The label for the profile matched items.
154
+
endif::[]
85
155
86
156
`<match>` is an optional list recursively defined as follows:
87
157
158
+
ifndef::rosa-hcp-tuning[]
88
159
[source,yaml]
89
160
----
90
161
- label: <label_name> <1>
@@ -96,6 +167,18 @@ The individual items of the list:
96
167
<2> Optional node or pod label value. If omitted, the presence of `<label_name>` is enough to match.
97
168
<3> Optional object type (`node` or `pod`). If omitted, `node` is assumed.
98
169
<4> An optional `<match>` list.
170
+
endif::rosa-hcp-tuning[]
171
+
ifdef::rosa-hcp-tuning[]
172
+
[source,yaml]
173
+
----
174
+
"match": [
175
+
{
176
+
"label": <1>
177
+
},
178
+
]
179
+
----
180
+
<1> Node or pod label name.
181
+
endif::[]
99
182
100
183
If `<match>` is not omitted, all nested `<match>` sections must also evaluate to `true`. Otherwise, `false` is assumed and the profile with the respective `<match>` section will not be applied or recommended. Therefore, the nesting (child `<match>` sections) works as logical AND operator. Conversely, if any item of the `<match>` list matches, the entire `<match>` list evaluates to `true`. Therefore, the list acts as logical OR operator.
101
184
@@ -109,6 +192,8 @@ When using machine config pool based matching, it is advised to group nodes with
109
192
====
110
193
111
194
.Example: node or pod label based matching
195
+
196
+
ifndef::rosa-hcp-tuning[]
112
197
[source,yaml]
113
198
----
114
199
- match:
@@ -127,9 +212,50 @@ When using machine config pool based matching, it is advised to group nodes with
127
212
- priority: 30
128
213
profile: openshift-node
129
214
----
215
+
endif::rosa-hcp-tuning[]
216
+
ifdef::rosa-hcp-tuning[]
217
+
[source,JSON]
218
+
----
219
+
[
220
+
{
221
+
"match": [
222
+
{
223
+
"label": "tuned.openshift.io/elasticsearch",
224
+
"match": [
225
+
{
226
+
"label": "node-role.kubernetes.io/master"
227
+
},
228
+
{
229
+
"label": "node-role.kubernetes.io/infra"
230
+
}
231
+
],
232
+
"type": "pod"
233
+
}
234
+
],
235
+
"priority": 10,
236
+
"profile": "openshift-control-plane-es"
237
+
},
238
+
{
239
+
"match": [
240
+
{
241
+
"label": "node-role.kubernetes.io/master"
242
+
},
243
+
{
244
+
"label": "node-role.kubernetes.io/infra"
245
+
}
246
+
],
247
+
"priority": 20,
248
+
"profile": "openshift-control-plane"
249
+
},
250
+
{
251
+
"priority": 30,
252
+
"profile": "openshift-node"
253
+
}
254
+
]
255
+
----
256
+
endif::[]
130
257
131
-
The CR above is translated for the containerized TuneD daemon into its `recommend.conf` file based on the profile priorities. The profile with the
132
-
highest priority (`10`) is `openshift-control-plane-es` and, therefore, it is considered first. The containerized TuneD daemon running on a given node looks to see if there is a pod running on the same node with the `tuned.openshift.io/elasticsearch` label set. If not, the entire `<match>` section evaluates as `false`. If there is such a pod with the label, in order for the `<match>` section to evaluate to `true`, the node label also needs to be `node-role.kubernetes.io/master` or `node-role.kubernetes.io/infra`.
258
+
The CR above is translated for the containerized TuneD daemon into its `recommend.conf` file based on the profile priorities. The profile with the highest priority (`10`) is `openshift-control-plane-es` and, therefore, it is considered first. The containerized TuneD daemon running on a given node looks to see if there is a pod running on the same node with the `tuned.openshift.io/elasticsearch` label set. If not, the entire `<match>` section evaluates as `false`. If there is such a pod with the label, in order for the `<match>` section to evaluate to `true`, the node label also needs to be `node-role.kubernetes.io/master` or `node-role.kubernetes.io/infra`.
133
259
134
260
If the labels for the profile with priority `10` matched, `openshift-control-plane-es` profile is applied and no other profile is considered. If the node/pod label combination did not match, the second highest priority profile (`openshift-control-plane`) is considered. This profile is applied if the containerized TuneD pod runs on a node with labels `node-role.kubernetes.io/master` or `node-role.kubernetes.io/infra`.
135
261
@@ -138,6 +264,7 @@ Finally, the profile `openshift-node` has the lowest priority of `30`. It lacks
"data": "[main]\nsummary=Custom OpenShift node profile with an additional kernel parameter\ninclude=openshift-node\n[bootloader]\ncmdline_openshift_node_custom=+skew_tick=1\n",
To minimize node reboots, label the target nodes with a label the machine config pool's node selector will match, then create the Tuned CR above and finally create the custom machine config pool itself.
166
324
@@ -184,25 +342,14 @@ To minimize node reboots, label the target nodes with a label the machine config
184
342
185
343
*Cloud provider-specific TuneD profiles*
186
344
187
-
With this functionality, all Cloud provider-specific nodes can conveniently
188
-
be assigned a TuneD profile specifically tailored to a given Cloud provider
189
-
on a {product-title} cluster. This can be accomplished without adding
190
-
additional node labels or grouping nodes into machine config pools.
345
+
With this functionality, all Cloud provider-specific nodes can conveniently be assigned a TuneD profile specifically tailored to a given Cloud provider on a {product-title} cluster. This can be accomplished without adding additional node labels or grouping nodes into machine config pools.
191
346
192
-
This functionality takes advantage of `spec.providerID` node object values
193
-
in the form of `<cloud-provider>://<cloud-provider-specific-id>` and writes
194
-
the file `/var/lib/tuned/provider` with the value `<cloud-provider>` in NTO
195
-
operand containers. The content of this file is then used by TuneD to load
196
-
`provider-<cloud-provider>` profile if such profile exists.
347
+
This functionality takes advantage of `spec.providerID` node object values in the form of `<cloud-provider>://<cloud-provider-specific-id>` and writes the file `/var/lib/tuned/provider` with the value `<cloud-provider>` in NTO operand containers. The content of this file is then used by TuneD to load `provider-<cloud-provider>` profile if such profile exists.
197
348
198
-
The `openshift` profile that both `openshift-control-plane` and
199
-
`openshift-node` profiles inherit settings from is now updated to use
200
-
this functionality through the use of conditional profile loading.
201
-
Neither NTO nor TuneD currently ship any Cloud provider-specific profiles.
202
-
However, it is possible to create a custom profile `provider-<cloud-provider>`
203
-
that will be applied to all Cloud provider-specific cluster nodes.
349
+
The `openshift` profile that both `openshift-control-plane` and `openshift-node` profiles inherit settings from is now updated to use this functionality through the use of conditional profile loading. Neither NTO nor TuneD currently include any Cloud provider-specific profiles. However, it is possible to create a custom profile `provider-<cloud-provider>` that will be applied to all Cloud provider-specific cluster nodes.
"data": "[main]\nsummary=GCE Cloud provider-specific profile\n# Your tuning for GCE Cloud provider goes here.\n",
383
+
"name": "provider-gce"
384
+
}
385
+
]
386
+
}
387
+
}
388
+
----
389
+
endif::[]
221
390
222
391
[NOTE]
223
392
====
224
-
Due to profile inheritance, any setting specified in the
225
-
`provider-<cloud-provider>` profile will be overwritten by the `openshift`
226
-
profile and its child profiles.
393
+
Due to profile inheritance, any setting specified in the `provider-<cloud-provider>` profile will be overwritten by the `openshift` profile and its child profiles.
0 commit comments