Skip to content

Commit 8df1d02

Browse files
authored
Merge pull request #28961 from bmcelvee/BZ1916082
Bug 1916082 bring forward updates to Automatically pruning images
2 parents f2dcc39 + 809ccf0 commit 8df1d02

File tree

1 file changed

+24
-34
lines changed

1 file changed

+24
-34
lines changed

modules/pruning-images.adoc

Lines changed: 24 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,8 @@
55
[id="pruning-images_{context}"]
66
= Automatically pruning images
77

8-
Images that are no longer required by the system due to age, status, or exceed limits are automatically pruned. Cluster administrators can configure the pruning custom resource, or delete it to disable it.
9-
10-
[NOTE]
11-
====
12-
When the pruning custom resource is deleted, the pruning `CronJob` and its related components should also be deleted.
13-
====
8+
Images that are no longer required by the system due to age,
9+
status, or exceed limits are automatically pruned. Cluster administrators can configure the Pruning Custom Resource, or suspend it.
1410

1511
.Prerequisites
1612

@@ -24,21 +20,20 @@ When the pruning custom resource is deleted, the pruning `CronJob` and its relat
2420
[source,yaml]
2521
----
2622
spec:
27-
schedule: "0 0 * * *" <1>
23+
schedule: 0 0 * * * <1>
2824
suspend: false <2>
2925
keepTagRevisions: 3 <3>
30-
keepYoungerThan: 60m <4>
31-
resources: {} <5>
32-
affinity: {} <6>
33-
nodeSelector: {} <7>
34-
tolerations: {} <8>
35-
startingDeadlineSeconds: 60 <9>
26+
keepYoungerThanDuration: 60m <4>
27+
keepYoungerThan: 3600000000000 <5>
28+
resources: {} <6>
29+
affinity: {} <7>
30+
nodeSelector: {} <8>
31+
tolerations: [] <9>
3632
successfulJobsHistoryLimit: 3 <10>
3733
failedJobsHistoryLimit: 3 <11>
38-
logLevel: Normal <12>
3934
status:
40-
observedGeneration: 2 <13>
41-
conditions: <14>
35+
observedGeneration: 2 <12>
36+
conditions: <13>
4237
- type: Available
4338
status: "True"
4439
lastTransitionTime: 2019-10-09T03:13:45
@@ -55,24 +50,19 @@ status:
5550
reason: Succeeded
5651
message: "Most recent image pruning job succeeded."
5752
----
58-
<1> `schedule`: `CronJob` formatted schedule, defaults to daily at midnight for new clusters. This is a required field.
59-
<2> `suspend`: If set to `true`, the `CronJob` running pruning is suspended. This is an optional field, and it defaults to `false`.
60-
<3> `keepTagRevisions`: The number of revisions per tag to keep. This is an optional field, and it defaults to `3` if not set.
61-
<4> `keepYoungerThan`: Retain images younger than this duration. This is an optional field, and it defaults `60m` if not set.
62-
<5> `resources`: Standard `Pod` resource requests and limits. This is an optional field.
63-
<6> `affinity`: Standard pod affinity. This is an optional field.
64-
<7> `nodeSelector`: Standard pod node selector for the image pruner pod. This is an optional field.
65-
<8> `tolerations`: Standard pod tolerations. This is an optional field.
66-
<9> `startingDeadlineSeconds`: Start deadline for `CronJob`. This is an optional field.
67-
<10> `successfulJobsHistoryLimit`: The maximum number of successful jobs to retain. Must be `>= 1` to ensure metrics are reported. Defaults to `3` if not set.
68-
<11> `failedJobsHistoryLimit`: The maximum number of failed jobs to retain. Must be `>= 1` to ensure metrics are reported. Defaults to `3` if not set.
69-
<12> `logLevel`: Sets the log level for the pruner job. Defaults to `Normal`.
70-
* `Normal`
71-
* `Debug`
72-
* `Trace`
73-
* `TraceAll`
74-
<13> `observedGeneration`: The generation observed by the Operator.
75-
<14> `conditions`: The standard condition objects with the following types:
53+
<1> `schedule`: `CronJob` formatted schedule. This is an optional field, default is daily at midnight.
54+
<2> `suspend`: If set to `true`, the `CronJob` running pruning is suspended. This is an optional field, default is `false`. The initial value on new clusters is `false`.
55+
<3> `keepTagRevisions`: The number of revisions per tag to keep. This is an optional field, default is `3`. The initial value is `3`.
56+
<4> `keepYoungerThanDuration`: Retain images younger than this duration. This is an optional field. If a value is not specified, either `keepYoungerThan` or the default value `60m` (60 minutes) is used.
57+
<5> `keepYoungerThan`: Deprecated. The same as `keepYoungerThanDuration`, but the duration is specified as an integer in nanoseconds. This is an optional field. When `keepYoungerThanDuration` is set, this field is ignored.
58+
<6> `resources`: Standard Pod resource requests and limits. This is an optional field.
59+
<7> `affinity`: Standard Pod affinity. This is an optional field.
60+
<8> `nodeSelector`: Standard Pod node selector. This is an optional field.
61+
<9> `tolerations`: Standard Pod tolerations. This is an optional field.
62+
<10> `successfulJobsHistoryLimit`: The maximum number of successful jobs to retain. Must be `>= 1` to ensure metrics are reported. This is an optional field, default is `3`. The initial value is `3`.
63+
<11> `failedJobsHistoryLimit`: The maximum number of failed jobs to retain. Must be `>= 1` to ensure metrics are reported. This is an optional field, default is `3`. The initial value is `3`.
64+
<12> `observedGeneration`: The generation observed by the Operator.
65+
<13> `conditions`: The standard condition objects with the following types:
7666
* `Available`: Indicates if the pruning job has been created. Reasons can be Ready or Error.
7767
* `Scheduled`: Indicates if the next pruning job has been scheduled. Reasons can be Scheduled, Suspended, or Error.
7868
* `Failed`: Indicates if the most recent pruning job failed.

0 commit comments

Comments
 (0)