Skip to content

Commit e2ff859

Browse files
authored
Merge pull request #92840 from mburke5678/mco-ocl-address-pruning
OSDOCS:14527 Docs for automatic OCL image pruning
2 parents c01c251 + e07ad04 commit e2ff859

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

machine_configuration/mco-coreos-layering.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ include::modules/coreos-layering-configuring-on.adoc[leveloffset=+1]
185185
.Additional resources
186186
* xref:../nodes/clusters/nodes-cluster-enabling-features.adoc#nodes-cluster-enabling[Enabling features using feature gates]
187187
* xref:../updating/updating_a_cluster/update-using-custom-machine-config-pools.adoc#update-using-custom-machine-config-pools-pause_update-using-custom-machine-config-pools[Pausing the machine config pools]
188+
* xref:../machine_configuration/mco-coreos-layering.adoc#coreos-layering-configuring-on-remove_mco-coreos-layering[Removing an on-cluster custom layered image]
188189

189190
include::modules/coreos-layering-configuring-on-modifying.adoc[leveloffset=+2]
190191

@@ -205,6 +206,8 @@ include::modules/coreos-layering-configuring-on-extensions.adoc[leveloffset=+2]
205206

206207
include::modules/coreos-layering-configuring-on-revert.adoc[leveloffset=+2]
207208

209+
include::modules/coreos-layering-configuring-on-remove.adoc[leveloffset=+2]
210+
208211
include::modules/coreos-layering-configuring.adoc[leveloffset=+1]
209212

210213
.Additional resources
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * machine_configuration/coreos-layering.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="coreos-layering-configuring-on-remove_{context}"]
7+
= Removing an on-cluster custom layered image
8+
9+
To prevent the custom layered images from taking up excessive space in your registry, you can automatically remove an on-cluster custom layered image from the repository by deleting the `MachineOSBuild` object that created the image.
10+
11+
The credentials provided by the registry push secret that you added to the the `MachineOSBuild` object must grant the permission for deleting an image from the registry. If the delete permission is not provided, the image is not removed when you delete the `MachineOSBuild` object.
12+
13+
Note that the custom layered image is not deleted if the image is either currently in use on a node or is desired by the nodes, as indicated by the `machineconfiguration.openshift.io/currentConfig` or `machineconfiguration.openshift.io/desiredConfig` annotation on the node.

modules/coreos-layering-configuring-on.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Note the following limitations when working with the on-cluster layering feature
7676
** Changing SSH keys
7777
** Removing mirroring rules from `ICSP`, `ITMS`, and `IDMS` objects
7878
** Changing the trusted CA, by updating the `user-ca-bundle` configmap in the `openshift-config` namespace
79-
* The images used in creating custom layered images take up space in your push registry. Always be aware of the free space in your registry and prune the images as needed.
79+
* The images used in creating custom layered images take up space in your push registry. Always be aware of the free space in your registry and prune the images as needed. You can automatically remove an on-cluster custom layered image from the repository by deleting the `MachineOSBuild` object that created the image. Note that the credentials provided by the registry push secret must also grant permission to delete an image from the registry. For more information, see "Removing an on-cluster custom layered image".
8080

8181
.Prerequisites
8282

@@ -94,6 +94,8 @@ Note the following limitations when working with the on-cluster layering feature
9494
In a disconnected environment, ensure that the disconnected cluster can access the registry where you want to push the image. Image mirroring applies only to pulling images.
9595
====
9696

97+
* You have the push secret of the registry that the MCO needs to push the new custom layered image to. If you want the custom layered image deleted when you delete the associated the `MachineOSBuild` object, the credentials provided by the secret must also grant permission to delete an image from the registry.
98+
9799
* You have a pull secret that your nodes need to pull the new custom layered image from your registry. This should be a different secret than the one used to push the image to the repository.
98100

99101
* You are familiar with how to configure a Containerfile. Instructions on how to create a Containerfile are beyond the scope of this documentation.

0 commit comments

Comments
 (0)