Skip to content

Commit eeff7b7

Browse files
committed
Follow-up edits to PR#3409
1 parent e458e71 commit eeff7b7

File tree

5 files changed

+65
-64
lines changed

5 files changed

+65
-64
lines changed

admin_guide/pruning_resources.adoc

+29-23
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ nor `--keep-younger-than`.
208208
prune:
209209

210210
[[image-prune-conditions]]
211+
*Image Prune Conditions*
211212

212213
* Remove any image "managed by {product-title}" (images with the annotation
213214
`*openshift.io/image.managed*`) that was created at least
@@ -276,20 +277,19 @@ $ oadm prune images --prune-over-size-limit --confirm
276277
----
277278

278279
[[image-pruning-problems]]
279-
=== Image pruning problems
280+
=== Image Pruning Problems
280281

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
283284
xref:image-prune-conditions[the conditions] that must apply for an image to be
284285
considered a candidate for pruning.
285286

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
288288
xref:../architecture/core_concepts/builds_and_image_streams.adoc#image-stream-tag[tag
289289
history] than your chosen tag revisions threshold. For example, consider an old
290290
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`:
293293

294294
----
295295
$ image_name="sha:abz"
@@ -302,25 +302,31 @@ myapp:v2.1 at position 2 out of 2
302302
myapp:v2.1-may-2016 at position 0 out of 1
303303
----
304304

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:
308308

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
314319
xref:../architecture/core_concepts/builds_and_image_streams.adoc#image-stream-tag[_istags_]
315320
where the position is below the revision threshold, which means
316321
`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.
320326

321327
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.]

architecture/core_concepts/builds_and_image_streams.adoc

+10-12
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ server is deployed, see xref:../../install_config/configuring_pipeline_execution
146146
[NOTE]
147147
====
148148
The Jenkins server is not automatically removed,
149-
even if all Pipeline build configurations are deleted.
149+
even if all Pipeline build configurations are deleted.
150150
It must be manually deleted by the user.
151151
====
152152

@@ -220,20 +220,18 @@ status:
220220
[[image-stream-image]]
221221
=== Image Stream Image
222222

223-
Image Stream Image is a virtual resource that allows to retrieve an image from
224-
a particular _image stream_ where it is tagged. It is often abbreviated as
225-
_isimage_. It consists of two parts delimited by at sign: `<image stream
226-
name>@<image name>`. To refer to the image in the
227-
xref:image-stream-object-definition[example above], the _isimage_ would look
228-
like this:
223+
An _image stream image_ is a virtual resource that allows you to retrieve an
224+
image from a particular _image stream_ where it is tagged. It is often
225+
abbreviated as _isimage_. It consists of two parts delimited by an at sign:
226+
`<image stream name>@<image name>`. To refer to the image in the
227+
xref:image-stream-object-definition[example above], the _isimage_ looks like:
229228

230229
----
231230
origin-ruby-sample@sha256:47463d94eb5c049b2d23b03a9530bf944f8f967a0fe79147dd6b9135bf7dd13d
232231
----
233232

234-
Users, without a permission to read or list images on the cluster lever, can still
235-
retrieve the images tagged in a project, they have access to, using this
236-
resource.
233+
Users, without permission to read or list images on the cluster level, can still
234+
retrieve the images tagged in a project they have access to using this resource.
237235

238236
[[image-stream-tag]]
239237
=== Image Stream Tag
@@ -248,12 +246,12 @@ the second position etc. This allows for easy rollbacks to make tags point to
248246
historical images again.
249247

250248
The _istag_ is composed of two parts separated by a colon: `<image stream
251-
name>:<tag>`. _Istag_ refering to the image
249+
name>:<tag>`. _Istag_ referring to the image
252250
`sha256:47463d94eb5c049b2d23b03a9530bf944f8f967a0fe79147dd6b9135bf7dd13d` in
253251
the xref:image-stream-object-definition[example above] would be
254252
`origin-ruby-sample:latest`.
255253

256-
.Image Stream Tag with two images in its history
254+
.Image Stream Tag with Two Images in its History
257255
====
258256
[source,yaml]
259257
----

dev_guide/application_lifecycle/promoting_applications.adoc

+8-8
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ of the system to facilitate testing of the different scenarios your application
125125
must support.
126126
ImageStreams, ImageStreamTags, and ImageStreamImage:: Detailed in the
127127
xref:dev-guide-promoting-application-images[Images] and
128-
xref:../../architecture/core_concepts/builds_and_image_streams.adoc#image-streams[image
129-
streams] sections, these objects are central to the {product-title} additions
130-
around managing container images. ServiceAccounts and RoleBindings:: Management
131-
of permissions to other API objects within {product-title}, as well as the
132-
external services of your enterprise, are intrinsic to managing your
133-
application. Similar to `Secrets`, the `ServiceAccounts` and `RoleBindingscan`
134-
objects vary in how they are shared between the different stages of your
135-
application promotion pipeline based on how your enterprise needs to share or
128+
xref:../../architecture/core_concepts/builds_and_image_streams.adoc#image-streams[Image
129+
Streams] sections, these objects are central to the {product-title} additions
130+
around managing container images.
131+
ServiceAccounts and RoleBindings:: Management of permissions to other API
132+
objects within {product-title}, as well as the external services, are intrinsic
133+
to managing your application. Similar to `Secrets`, the `ServiceAccounts` and
134+
`RoleBindingscan` objects vary in how they are shared between the different
135+
stages of your application promotion pipeline based on your needs to share or
136136
isolate those different environments.
137137
PersistentVolumeClaims:: Relevant to stateful services like databases, how much
138138
these are shared between your different application promotion stages directly

dev_guide/builds.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -1178,12 +1178,12 @@ executing the build.
11781178
=== Image Source
11791179

11801180
Additional files can be provided to the build process via images. Input images
1181-
are referenced in the same way the `*From*` and `*To*` image targets are
1182-
defined. This means both container images and
1181+
are referenced in the same way the `From` and `To` image targets are defined.
1182+
This means both container images and
11831183
xref:../architecture/core_concepts/builds_and_image_streams.adoc#image-stream-tag[image
11841184
stream tags] can be referenced. In conjunction with the image, you must provide
1185-
one or more path pairs to indicate the path of the files/directories to copy
1186-
out of the image and the destination to place them in the build context.
1185+
one or more path pairs to indicate the path of the files or directories to copy
1186+
the image and the destination to place them in the build context.
11871187

11881188
The source path can be any absolute path within the image specified. The
11891189
destination must be a relative directory path. At build time, the image will be

dev_guide/managing_images.adoc

+14-17
Original file line numberDiff line numberDiff line change
@@ -119,21 +119,19 @@ that prevents the registry client from pulling from such a tag.
119119
[[tag-naming]]
120120
=== Tag Naming
121121

122-
Images evolve over time and tag reflects it. It always points to the latest
123-
image built. If there is too much information embedded in a tag name (e.g.
124-
`v2.0.1-may-2016`), the tag will probably point to just one revision of an
125-
image and will never be updated. Using default image pruning options, such an
126-
image will never be removed. Instead, if the tag is named `v2.0`, there's much
127-
higher probability of more image revisions which means longer
122+
Images evolve over time and the tag reflects this. It always points to the
123+
latest image built. If there is too much information embedded in a tag name (for
124+
example, `v2.0.1-may-2016`), the tag will point to just one revision of an image
125+
and will never be updated. Using default image pruning options, such an image
126+
will never be removed. Instead, if the tag is named `v2.0`, more image revisions
127+
are more likely. This results in longer
128128
xref:../architecture/core_concepts/builds_and_image_streams.adoc#image-stream-tag[tag
129-
history] and therefore image pruner will more probably remove old and unsed
130-
images.
129+
history] and, therefore, the image pruner will more likely remove old and unused
130+
images. Refer to
131+
xref:../admin_guide/pruning_resources.adoc#pruning-images[pruning images] for
132+
more information.
131133

132-
Refer to xref:../admin_guide/pruning_resources.adoc#pruning-images[pruning
133-
images] for more information.
134-
135-
Although tag naming convention is up to you, here are a few examples for
136-
inspiration:
134+
Although tag naming convention is up to you, here are a few examples:
137135

138136
[width="40%",frame="topbot",options="header"]
139137
|======================
@@ -143,10 +141,9 @@ inspiration:
143141
|Base image |`v1.2-centos7`
144142
|======================
145143

146-
If you require dates in tag names, you should periodically inspect old and
147-
unsupported images and _istags_ and remove them. Otherwise you might experience
148-
increasing resource usage caused by old images.
149-
144+
If you require dates in tag names, periodically inspect old and unsupported
145+
images and _istags_ and remove them. Otherwise, you might experience increasing
146+
resource usage caused by old images.
150147
[[tag-removal]]
151148
=== Removing Tags from Image Streams
152149
To remove a tag completely from an image stream run:

0 commit comments

Comments
 (0)