Skip to content

Commit a90bb3a

Browse files
author
Michael Burke
committed
MachineConfigPool name and kubelet/containerruntimeconfigs role must be the same
1 parent eae1e41 commit a90bb3a

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

modules/create-a-containerruntimeconfig-crd.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ spec:
9292
overlaySize: 8G <3>
9393
defaultRuntime: "crun" <4>
9494
----
95-
<1> Specifies the machine config pool label.
95+
<1> Specifies the machine config pool label. For a container runtime config, the role must match the name of the associated machine config pool.
9696
<2> Optional: Specifies the level of verbosity for log messages.
9797
<3> Optional: Specifies the maximum size of a container image.
9898
<4> Optional: Specifies the container runtime to deploy to new containers. The default value is `runc`.

modules/create-a-kubeletconfig-crd-to-edit-kubelet-parameters.adoc

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,32 @@ As the fields in the `kubeletConfig` object are passed directly to the kubelet f
1616

1717
Consider the following guidance:
1818

19-
* Create one `KubeletConfig` CR for each machine config pool with all the config changes you want for that pool. If you are applying the same content to all of the pools, you need only one `KubeletConfig` CR for all of the pools.
20-
2119
* Edit an existing `KubeletConfig` CR to modify existing settings or add new settings, instead of creating a CR for each change. It is recommended that you create a CR only to modify a different machine config pool, or for changes that are intended to be temporary, so that you can revert the changes.
2220
21+
* Create one `KubeletConfig` CR for each machine config pool with all the config changes you want for that pool.
22+
2323
* As needed, create multiple `KubeletConfig` CRs with a limit of 10 per cluster. For the first `KubeletConfig` CR, the Machine Config Operator (MCO) creates a machine config appended with `kubelet`. With each subsequent CR, the controller creates another `kubelet` machine config with a numeric suffix. For example, if you have a `kubelet` machine config with a `-2` suffix, the next `kubelet` machine config is appended with `-3`.
2424
25+
[NOTE]
26+
====
27+
If you are applying a kubelet or container runtime config to a custom machine config pool, the custom role in the `machineConfigSelector` must match the name of the custom machine config pool.
28+
29+
For example, because the following custom machine config pool is named `infra`, the custom role must also be `infra`:
30+
31+
[source,yaml]
32+
----
33+
apiVersion: machineconfiguration.openshift.io/v1
34+
kind: MachineConfigPool
35+
metadata:
36+
name: infra
37+
spec:
38+
machineConfigSelector:
39+
matchExpressions:
40+
- {key: machineconfiguration.openshift.io/role, operator: In, values: [worker,infra]}
41+
# ...
42+
----
43+
====
44+
2545
If you want to delete the machine configs, delete them in reverse order to avoid exceeding the limit. For example, you delete the `kubelet-3` machine config before deleting the `kubelet-2` machine config.
2646

2747
[NOTE]

0 commit comments

Comments
 (0)