1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/mco-update-boot-images-disable.adoc
SOURAV JAIN 6ba533849d Update mco-update-boot-images-disable.adoc
https://issues.redhat.com/browse/OSDOCS-18041 Doc bug PR for machineconfiguration namespace.
2026-01-30 20:43:36 +00:00

144 lines
4.8 KiB
Plaintext

// Module included in the following assemblies:
//
// * machine-configuration/mco-update-boot-images.adoc
// * nodes/nodes/nodes-update-boot-images.adoc
:_mod-docs-content-type: PROCEDURE
[id="mco-update-boot-images-disable_{context}"]
= Disabling boot image management
[role="_abstract"]
You can disable the boot image management feature so that the Machine Config Operator (MCO) no longer manages or updates the boot image in the affected machine sets. For example, you could disable this feature for the worker nodes in order to use a custom boot image that you do not want changed.
You disable the boot image management feature for the control plane or worker machine sets in your cluster by editing the `MachineConfiguration` object.
[NOTE]
====
include::snippets/mco-update-boot-images-intro.adoc[]
====
Disabling this feature does not rollback the nodes or machine sets to the originally-installed boot image. The machine sets retain the boot image version that was present when the feature was disabled and is not updated if the cluster is upgraded to a new {product-title} version in the future. This feature has no effect on existing nodes.
After disabling the feature, you can re-enable the feature at any time. For more information, see "Enabling updated boot images".
.Procedure
. Edit the `MachineConfiguration` object, named `cluster`, by using the following command::
+
[source,terminal]
----
$ oc edit MachineConfiguration cluster
----
. Disable the feature for some or all of your machine sets:
+
[source,yaml]
----
apiVersion: operator.openshift.io/v1
kind: MachineConfiguration
metadata:
name: cluster
spec:
# ...
managedBootImages:
machineManagers:
- apiGroup: machine.openshift.io
resource: machinesets
selection:
mode: None
- apiGroup: machine.openshift.io
resource: controlplanemachinesets
selection:
mode: None
----
+
--
where:
`spec.managedBootImages`:: Configures the boot image management feature.
`spec.managedBootImages.machineManagers.selection.mode.None`:: Specifies that the feature is disabled for all machine sets in the cluster. Set the selection mode to `None` for one or both of the following resources to disable the feature for that resource.
* `controlplanemachinesets`: Disable boot image management for control plane machine sets.
* `machinesets`: Disables boot image management for worker machine sets.
--
////
Hiding per djoshy https://github.com/openshift/openshift-docs/pull/93065#pullrequestreview-2844549815
* Optional: Disable the default behavior for specific machine sets:
+
[source,yaml]
----
apiVersion: operator.openshift.io/v1
kind: MachineConfiguration
metadata:
name: cluster
spec:
# ...
managedBootImages: <1>
machineManagers:
- apiGroup: machine.openshift.io <2>
resource: machinesets <3>
selection:
mode: Partial <4>
partial:
machineResourceSelector: <5>
matchLabels:
region: "east"
----
<1> Configures the boot image management feature.
<2> Specifies an API group. This must be `machine.openshift.io`.
<3> Specifies the resource within the specified API group to apply the change. This must be `machinesets`.
<4> Specifies that the feature is disabled for specific machine sets.
<5> Specifies that the feature is enabled only for machine sets with these labels. The feature is disabled for any machine set that does not contain the listed labels.
////
.Verification
* View the current state of the boot image management feature by using the following command to view the machine configuration object:
+
[source,terminal]
----
$ oc get machineconfiguration cluster -o yaml
----
+
.Example machine set with the boot image reference
+
[source,yaml]
----
kind: MachineConfiguration
metadata:
name: cluster
# ...
status:
conditions:
- lastTransitionTime: "2025-05-01T20:11:49Z"
message: Reconciled 2 of 4 MAPI MachineSets | Reconciled 0 of 0 CAPI MachineSets
| Reconciled 0 of 0 CAPI MachineDeployments
reason: BootImageUpdateConfigurationUpdated
status: "True"
type: BootImageUpdateProgressing
- lastTransitionTime: "2025-05-01T19:30:13Z"
message: 0 Degraded MAPI MachineSets | 0 Degraded CAPI MachineSets | 0 CAPI MachineDeployments
reason: BootImageUpdateConfigurationUpdated
status: "False"
type: BootImageUpdateDegraded
managedBootImagesStatus:
machineManagers:
- apiGroup: machine.openshift.io
resource: controlplanemachinesets
selection:
mode: None
- apiGroup: machine.openshift.io
resource: machinesets
selection:
mode: All
----
+
--
where:
`status.managedBootImagesStatus.machineManagers.selection.mode`:: Specifies that the boot image management feature is disabled when set to `None`. In this example, the boot image management feature is disabled for control plane machine sets and enabled for worker machine sets.
--