mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
TELCODOCS-1861: Automatic image cleanup in container storage disk
This commit is contained in:
committed by
openshift-cherrypick-robot
parent
8108fdd8d3
commit
a15ecc573f
@@ -3229,6 +3229,8 @@ Topics:
|
||||
File: cnf-image-based-upgrade-prep-resources
|
||||
- Name: Creating ConfigMap objects for the image-based upgrade with Lifecycle Agent using GitOps ZTP
|
||||
File: ztp-image-based-upgrade-prep-resources
|
||||
- Name: Configuring the automatic image cleanup of the container storage disk
|
||||
File: cnf-image-based-upgrade-auto-image-cleanup
|
||||
- Name: Performing an image-based upgrade for single-node OpenShift clusters with the Lifecycle Agent
|
||||
File: cnf-image-based-upgrade-base
|
||||
- Name: Performing an image-based upgrade for single-node OpenShift clusters using GitOps ZTP
|
||||
|
||||
@@ -72,6 +72,8 @@ include::modules/cnf-image-based-upgrade.adoc[leveloffset=+1]
|
||||
[role="_additional-resources"]
|
||||
.Additional resources
|
||||
|
||||
* xref:../../edge_computing/image_based_upgrade/preparing_for_image_based_upgrade/cnf-image-based-upgrade-auto-image-cleanup#cnf-image-based-upgrade-configure-auto-image-cleanup[Configuring the automatic image cleanup of the container storage disk]
|
||||
|
||||
* xref:../../edge_computing/image_based_upgrade/cnf-image-based-upgrade-base.adoc#cnf-image-based-upgrade[Performing an image-based upgrade for {sno} clusters with {lcao}]
|
||||
|
||||
* xref:../../edge_computing/image_based_upgrade/ztp-image-based-upgrade.adoc#ztp-image-based-upgrade[Performing an image-based upgrade for {sno} clusters using {ztp}]
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
:_mod-docs-content-type: ASSEMBLY
|
||||
[id="cnf-image-based-upgrade-configure-auto-image-cleanup"]
|
||||
= Configuring the automatic image cleanup of the container storage disk
|
||||
include::_attributes/common-attributes.adoc[]
|
||||
:context: auto-cleanup
|
||||
|
||||
toc::[]
|
||||
|
||||
Configure when the {lcao} cleans up unpinned images in the `Prep` stage by setting a minimum threshold for available storage space through annotations.
|
||||
The default container storage disk usage threshold is 50%.
|
||||
|
||||
The {lcao} does not delete images that are pinned in CRI-O or are currently used.
|
||||
The Operator selects the images for deletion by starting with dangling images and then sorting the images from oldest to newest that is determined by the image `Created` timestamp.
|
||||
|
||||
include::modules/cnf-image-based-upgrade-configure-container-storage-image-cleanup.adoc[leveloffset=+1]
|
||||
|
||||
include::modules/cnf-image-based-upgrade-disable-container-storage-image-cleanup.adoc[leveloffset=+1]
|
||||
@@ -0,0 +1,28 @@
|
||||
// Module included in the following assemblies:
|
||||
// * edge_computing/image-based-upgrade/cnf-image-based-upgrade-shared-container-partition
|
||||
|
||||
:_mod-docs-content-type: PROCEDURE
|
||||
[id="ztp-image-based-upgrade-configure-threshold_{context}"]
|
||||
= Configuring the automatic image cleanup of the container storage disk
|
||||
|
||||
Configure the minimum threshold for available storage space through annotations.
|
||||
|
||||
.Prerequisites
|
||||
|
||||
* Create an `ImageBasedUpgrade` CR.
|
||||
|
||||
.Procedure
|
||||
|
||||
. Increase the threshold to 65% by running the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc -n openshift-lifecycle-agent annotate ibu upgrade image-cleanup.lca.openshift.io/disk-usage-threshold-percent='65'
|
||||
----
|
||||
|
||||
. (Optional) Remove the threshold override by running the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc -n openshift-lifecycle-agent annotate ibu upgrade image-cleanup.lca.openshift.io/disk-usage-threshold-percent-
|
||||
----
|
||||
@@ -0,0 +1,24 @@
|
||||
// Module included in the following assemblies:
|
||||
// * edge_computing/image-based-upgrade/cnf-image-based-upgrade-shared-container-partition
|
||||
|
||||
:_mod-docs-content-type: PROCEDURE
|
||||
[id="ztp-image-based-upgrade-disable-container-storage-image-cleanup_{context}"]
|
||||
= Disable the automatic image cleanup of the container storage disk
|
||||
|
||||
Disable the automatic image cleanup threshold.
|
||||
|
||||
.Procedure
|
||||
|
||||
. Disable the automatic image cleanup by running the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc -n openshift-lifecycle-agent annotate ibu upgrade image-cleanup.lca.openshift.io/on-prep='Disabled'
|
||||
----
|
||||
|
||||
. (Optional) Enable automatic image cleanup again by running the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc -n openshift-lifecycle-agent annotate ibu upgrade image-cleanup.lca.openshift.io/on-prep-
|
||||
----
|
||||
@@ -56,7 +56,10 @@ For the `Prep` stage, you specify the following upgrade details in the `ImageBas
|
||||
* extra manifests to apply and custom catalog sources to retain after the upgrade, if any
|
||||
|
||||
Then, based on what you specify, the {lcao} prepares for the upgrade without impacting the current running version.
|
||||
During this stage, the {lcao} ensures that the target cluster is ready to proceed to the `Upgrade` stage by checking if it meets certain conditions and pulls the seed image to the target cluster with additional container images specified in the seed image.
|
||||
During this stage, the {lcao} ensures that the target cluster is ready to proceed to the `Upgrade` stage by checking if it meets certain conditions.
|
||||
The Operator pulls the seed image to the target cluster with additional container images specified in the seed image.
|
||||
The {lcao} checks if there is enough space on the container storage disk and if necessary, the Operator deletes unpinned images until the disk usage is below the specified threshold.
|
||||
For more information about how to configure or disable the cleaning up of the container storage disk, see "Configuring the automatic image cleanup of the container storage disk".
|
||||
|
||||
You also prepare backup resources with the {oadp-short} Operator's `Backup` and `Restore` CRs.
|
||||
These CRs are used in the `Upgrade` stage to reconfigure the cluster, register the cluster with {rh-rhacm}, and restore application artifacts.
|
||||
|
||||
Reference in New Issue
Block a user