Image Cleanup

2024-11-07 06:53:23

Image Edition Retention

Overview

The Cloud Container Repository supports the setting of image edition retention rules, allowing users to customize the image editions they want to keep and delete image editions that fall outside of these retention rules.

Procedure

Creating an Edition Retention Rule

1.      Access the Cloud Container Repository console.

2.      Click the name of the activated instance.

3.      In the left navigation pane, click Container Image - Edition Retention.

4.      On the Edition Retention page, select the namespace in the top-right corner, and then click the Create Rule button.

5.      Fill in the Repository and Tag for the rule to take effect. The matching rules for the repository and Tag are as follows:

Parameter

Description

key

Exact match for the repository or Tag named   "key"

key*

Matches any repository or Tag with a prefix of   "key"

**

Matches all repositories or Tags

{key1,key2,key3*}

Matches multiple repositories or Tags

6.      Select Retention Conditions and fill in the corresponding quantity or time. The available retention conditions are as follows:

1.        Retain the recent N images pushed

2.        Retain the images pushed in the last D days

3.        Retain the recent N images pulled

4.        Retain the images pulled in the last D days

7.      Click Confirm to complete the rule creation.

Editing Scheduling Expression

1.      After creating an edition retention rule, you can edit the execution time of the rule on the Edition Retention page.

2.      Click the Edit button next to the scheduling expression. You can select Manual Execution or Scheduled Execution.

3.      If Manual Execution is selected, the rule can only be triggered manually.

4.      If Scheduled Execution is selected, you can edit the timing expression in the widget.

5.      Click Save. In the pop-up box, check "I have checked all the rules and confirmed the operation", then click Confirm to complete the editing of the scheduled expression.

Executing Edition Retention Rules Manually

1.      After creating an edition retention rule, you can manually execute the rule on the Edition Retention page.

2.      Click the Execute Now or Simulate Execution button on the right of Execution Plan to manually execute the rule. Among them, Simulated Execution do not actually delete the image edition.

3.      In the pop-up box, select "I have checked all the rules and confirmed the operation", then click Confirm to initiate execution.

4.      Once execution is completed, you can view the results in the Execution Plan list column

 


of900Yu1QfaI