Skip to content

Commit ffe6918

Browse files
authored
Merge pull request #63304 from stevsmit/OCPBUGS9438-update-command
Updates manual pruning command in Images docs
2 parents 179b550 + c7ea318 commit ffe6918

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

modules/pruning-images-manual.adoc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,16 +287,15 @@ pruning.
287287

288288
Ensure that images you want removed occur at higher positions in each tag
289289
history than your chosen tag revisions threshold. For example, consider an old
290-
and obsolete image named `sha:abz`. By running the following command in
291-
namespace `N`, where the image is tagged, the image is tagged three times in a
290+
and obsolete image named `sha256:abz`. By running the following command in your
291+
namespace, where the image is tagged, the image is tagged three times in a
292292
single image stream named `myapp`:
293293

294294
[source,terminal]
295295
----
296-
$ oc get is -n N -o go-template='{{range $isi, $is := .items}}{{range $ti, $tag := $is.status.tags}}'\
297-
'{{range $ii, $item := $tag.items}}{{if eq $item.image "'"sha:abz"\
298-
$'"}}{{$is.metadata.name}}:{{$tag.tag}} at position {{$ii}} out of {{len $tag.items}}\n'\
299-
'{{end}}{{end}}{{end}}{{end}}'
296+
$ oc get is -n <namespace> -o go-template='{{range $isi, $is := .items}}{{range $ti, $tag := $is.status.tags}}'\
297+
'{{range $ii, $item := $tag.items}}{{if eq $item.image "sha256:<hash>"}}{{$is.metadata.name}}:{{$tag.tag}} at position {{$ii}} out of {{len $tag.items}}\n'\
298+
'{{end}}{{end}}{{end}}{{end}}'
300299
----
301300

302301
.Example output

0 commit comments

Comments
 (0)