From 8d5f79af5a09a27314b43d6084dc023a4d2ea94b Mon Sep 17 00:00:00 2001 From: Steven Smith Date: Tue, 9 Sep 2025 15:56:27 -0400 Subject: [PATCH] Adds note to Image Stream Tags docs --- ...ges-cluster-sample-imagestream-import.adoc | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/modules/images-cluster-sample-imagestream-import.adoc b/modules/images-cluster-sample-imagestream-import.adoc index 55f3e0b4b913..2fe8dd38b1b0 100644 --- a/modules/images-cluster-sample-imagestream-import.adoc +++ b/modules/images-cluster-sample-imagestream-import.adoc @@ -13,21 +13,21 @@ You can ensure that you always have access to the latest versions of the Cluster + [source,terminal] ---- -oc get imagestreams -nopenshift +oc get imagestreams -n openshift ---- . Fetch the tags for every imagestream in the `openshift` namespace by running the following command: + [source,terminal] ---- -$ oc get is -o jsonpath="{range .spec.tags[*]}{.name}{'\t'}{.from.name}{'\n'}{end}" -nopenshift +$ oc get is -o jsonpath="{range .spec.tags[*]}{.name}{'\t'}{.from.name}{'\n'}{end}" -n openshift ---- + For example: + [source,terminal] ---- -$ oc get is ubi8-openjdk-17 -o jsonpath="{range .spec.tags[*]}{.name}{'\t'}{.from.name}{'\n'}{end}" -nopenshift +$ oc get is ubi8-openjdk-17 -o jsonpath="{range .spec.tags[*]}{.name}{'\t'}{.from.name}{'\n'}{end}" -n openshift ---- + .Example output @@ -41,31 +41,40 @@ $ oc get is ubi8-openjdk-17 -o jsonpath="{range .spec.tags[*]}{.name}{'\t'}{.fro + [source,terminal] ---- -$ oc tag --scheduled -nopenshift +$ oc tag --scheduled -n openshift ---- + For example: + [source,terminal] ---- -$ oc tag registry.access.redhat.com/ubi8/openjdk-17:1.11 ubi8-openjdk-17:1.11 --scheduled -nopenshift -$ oc tag registry.access.redhat.com/ubi8/openjdk-17:1.12 ubi8-openjdk-17:1.12 --scheduled -nopenshift +$ oc tag registry.access.redhat.com/ubi8/openjdk-17:1.11 ubi8-openjdk-17:1.11 --scheduled -n openshift ---- + -This command causes {product-title} to periodically update this particular image stream tag. This period is a cluster-wide setting set to 15 minutes by default. +[source,terminal] +---- +$ oc tag registry.access.redhat.com/ubi8/openjdk-17:1.12 ubi8-openjdk-17:1.12 --scheduled -n openshift +---- ++ +[NOTE] +==== +Using the `--scheduled` flag is recommended to periodically re-import an image when working with an external container image registry. The `--scheduled` flag helps to ensure that you receive the latest versions and security updates. Additionally, this setting allows the import process to automatically retry if a temporary error initially prevents the image from being imported. + +By default, scheduled image imports occur every 15 minutes cluster-wide. +==== . Verify the scheduling status of the periodic import by running the following command: + [source,terminal] ---- -oc get imagestream -o jsonpath="{range .spec.tags[*]}Tag: {.name}{'\t'}Scheduled: {.importPolicy.scheduled}{'\n'}{end}" -nopenshift +oc get imagestream -o jsonpath="{range .spec.tags[*]}Tag: {.name}{'\t'}Scheduled: {.importPolicy.scheduled}{'\n'}{end}" -n openshift ---- + For example: + [source,terminal] ---- -oc get imagestream ubi8-openjdk-17 -o jsonpath="{range .spec.tags[*]}Tag: {.name}{'\t'}Scheduled: {.importPolicy.scheduled}{'\n'}{end}" -nopenshift +oc get imagestream ubi8-openjdk-17 -o jsonpath="{range .spec.tags[*]}Tag: {.name}{'\t'}Scheduled: {.importPolicy.scheduled}{'\n'}{end}" -n openshift ---- + .Example output