@@ -208,6 +208,7 @@ nor `--keep-younger-than`.
208
208
prune:
209
209
210
210
[[image-prune-conditions]]
211
+ *Image Prune Conditions*
211
212
212
213
* Remove any image "managed by {product-title}" (images with the annotation
213
214
`*openshift.io/image.managed*`) that was created at least
@@ -276,20 +277,19 @@ $ oadm prune images --prune-over-size-limit --confirm
276
277
----
277
278
278
279
[[image-pruning-problems]]
279
- === Image pruning problems
280
+ === Image Pruning Problems
280
281
281
- If your images keep pilling up and prune command removes just a small portion
282
- of what you would expect, make sure you understand
282
+ If your images keep accumulating and the ` prune` command removes just a small
283
+ portion of what you expect, ensure that you understand
283
284
xref:image-prune-conditions[the conditions] that must apply for an image to be
284
285
considered a candidate for pruning.
285
286
286
- Especially, ensure that images you want removed occur at higher positions in
287
- each
287
+ Especially ensure that images you want removed occur at higher positions in each
288
288
xref:../architecture/core_concepts/builds_and_image_streams.adoc#image-stream-tag[tag
289
289
history] than your chosen tag revisions threshold. For example, consider an old
290
290
and obsolete image named `sha:abz`. By running the following command in
291
- namespace `N`, where the image is tagged, you will see the image is tagged
292
- three times in a single image stream named `myapp`:
291
+ namespace `N`, where the image is tagged, you will see the image is tagged three
292
+ times in a single image stream named `myapp`:
293
293
294
294
----
295
295
$ image_name="sha:abz"
@@ -302,25 +302,31 @@ myapp:v2.1 at position 2 out of 2
302
302
myapp:v2.1-may-2016 at position 0 out of 1
303
303
----
304
304
305
- The image will not be ever pruned, when default options are used, because it
306
- occurs at position 0 in a history of `myapp:v2.1-may-2016` tag. For an image to
307
- be considered for pruning, the admin would have to either:
305
+ When default options are used, the image will not ever be pruned because it
306
+ occurs at position `0` in a history of `myapp:v2.1-may-2016` tag. For an image to
307
+ be considered for pruning, the administrator must either:
308
308
309
- 1. Specify `--keep-tag-revisions=0` to `oadm prune images` command, which is
310
- very dangerous and should be used with care. It will effectively remove all the
311
- tags from all the namespaces with underlying images, unless they are younger or
312
- they are referenced by objects younger than the specified threshold.
313
- 2. Delete all the
309
+ . Specify `--keep-tag-revisions=0` with the `oadm prune images` command.
310
+ +
311
+ [CAUTION]
312
+ ====
313
+ This action will effectively remove all the tags from all the namespaces with
314
+ underlying images, unless they are younger or they are referenced by objects
315
+ younger than the specified threshold.
316
+ ====
317
+
318
+ . Delete all the
314
319
xref:../architecture/core_concepts/builds_and_image_streams.adoc#image-stream-tag[_istags_]
315
320
where the position is below the revision threshold, which means
316
321
`myapp:v2.1` and `myapp:v2.1-may-2016`.
317
- 3. Move the image further in the history, either by running new builds pushing
318
- to the same _istag_, or by tagging other image. Unfortunately, this might not
319
- always be desirable for old release tags.
322
+
323
+ . Move the image further in the history, either by running new builds pushing to
324
+ the same _istag_, or by tagging other image. Unfortunately, this is not always
325
+ desirable for old release tags.
320
326
321
327
Tags having a date or time of a particular image's build in their names should
322
- be avoided, unless the image needs to be preserved for undefined amount of
323
- time. Such tags tend to have just one image in its history, which effectively
324
- prevents them from being pruned, ever .
325
- xref:../dev_guide/managing_images.adoc#tag-naming[Here], you will find more
326
- information on _istag_ naming.
328
+ be avoided, unless the image needs to be preserved for undefined amount of time.
329
+ Such tags tend to have just one image in its history, which effectively prevents
330
+ them from ever being pruned.
331
+ xref:../dev_guide/managing_images.adoc#tag-naming[Learn more about _istag_
332
+ naming.]
0 commit comments