Skip to content

Commit 375f122

Browse files
author
Shubha Narayanan
committed
Added importing of image stream tags
1 parent 00dce91 commit 375f122

File tree

2 files changed

+85
-7
lines changed

2 files changed

+85
-7
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
// Module included in the following assemblies:
2+
// * openshift_images/cluster-tasks.adoc
3+
4+
:_content-type: PROCEDURE
5+
[id="images-cluster-sample-imagestream-import_{context}"]
6+
= Configuring periodic importing of Cluster Sample Operator image stream tags
7+
8+
You can ensure that you always have access to the latest versions of the Cluster Sample Operator images by periodically importing the image stream tags when new versions become available.
9+
10+
.Procedure
11+
12+
. Fetch all the imagestreams in the `openshift` namespace by running the following command:
13+
+
14+
[source,terminal]
15+
----
16+
oc get imagestreams -nopenshift
17+
----
18+
19+
. Fetch the tags for every imagestream in the `openshift` namespace by running the following command:
20+
+
21+
[source, terminal]
22+
----
23+
$ oc get is <image-stream-name> -o jsonpath="{range .spec.tags[*]}{.name}{'\t'}{.from.name}{'\n'}{end}" -nopenshift
24+
----
25+
+
26+
For example:
27+
+
28+
[source, terminal]
29+
----
30+
$ oc get is ubi8-openjdk-17 -o jsonpath="{range .spec.tags[*]}{.name}{'\t'}{.from.name}{'\n'}{end}" -nopenshift
31+
----
32+
+
33+
.Example output
34+
[source, terminal]
35+
----
36+
1.11 registry.access.redhat.com/ubi8/openjdk-17:1.11
37+
1.12 registry.access.redhat.com/ubi8/openjdk-17:1.12
38+
----
39+
40+
. Schedule periodic importing of images for each tag present in the image stream by running the following command:
41+
+
42+
[source,terminal]
43+
----
44+
$ oc tag <repository/image> <image-stream-name:tag> --scheduled -nopenshift
45+
----
46+
+
47+
For example:
48+
+
49+
[source,terminal]
50+
----
51+
$ oc tag registry.access.redhat.com/ubi8/openjdk-17:1.11 ubi8-openjdk-17:1.11 --scheduled -nopenshift
52+
$ oc tag registry.access.redhat.com/ubi8/openjdk-17:1.12 ubi8-openjdk-17:1.12 --scheduled -nopenshift
53+
----
54+
+
55+
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.
56+
57+
. Verify the scheduling status of the periodic import by running the following command:
58+
+
59+
[source,terminal]
60+
----
61+
oc get imagestream <image-stream-name> -o jsonpath="{range .spec.tags[*]}Tag: {.name}{'\t'}Scheduled: {.importPolicy.scheduled}{'\n'}{end}" -nopenshift
62+
----
63+
+
64+
For example:
65+
+
66+
[source,terminal]
67+
----
68+
oc get imagestream ubi8-openjdk-17 -o jsonpath="{range .spec.tags[*]}Tag: {.name}{'\t'}Scheduled: {.importPolicy.scheduled}{'\n'}{end}" -nopenshift
69+
----
70+
+
71+
.Example output
72+
[source,terminal]
73+
----
74+
Tag: 1.11 Scheduled: true
75+
Tag: 1.12 Scheduled: true
76+
----

post_installation_configuration/cluster-tasks.adoc

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ After you deploy your {product-title} cluster, you can add worker nodes to scale
171171

172172
For installer-provisioned infrastructure clusters, you can manually or automatically scale the `MachineSet` object to match the number of available bare-metal hosts.
173173

174-
To add a bare-metal host, you must configure all network prerequisites, configure an associated `baremetalhost` object, then provision the worker node to the cluster. You can add a bare-metal host manually or by using the web console.
175-
176-
* xref:../scalability_and_performance/managing-bare-metal-hosts.adoc#adding-bare-metal-host-to-cluster-using-web-console_managing-bare-metal-hosts[Adding worker nodes using the web console]
174+
To add a bare-metal host, you must configure all network prerequisites, configure an associated `baremetalhost` object, then provision the worker node to the cluster. You can add a bare-metal host manually or by using the web console.
175+
176+
* xref:../scalability_and_performance/managing-bare-metal-hosts.adoc#adding-bare-metal-host-to-cluster-using-web-console_managing-bare-metal-hosts[Adding worker nodes using the web console]
177177

178178
* xref:../scalability_and_performance/managing-bare-metal-hosts.adoc#adding-bare-metal-host-to-cluster-using-yaml_managing-bare-metal-hosts[Adding worker nodes using YAML in the web console]
179179

@@ -191,13 +191,13 @@ For user-provisioned infrastructure clusters, you can add worker nodes by using
191191

192192
For clusters managed by the Assisted Installer, you can add worker nodes by using the {cluster-manager-first} console, the Assisted Installer REST API or you can manually add worker nodes using an ISO image and cluster Ignition config files.
193193

194-
* xref:../nodes/nodes/nodes-sno-worker-nodes.adoc#sno-adding-worker-nodes-to-sno-clusters_add-workers[Adding worker nodes using the OpenShift Cluster Manager]
194+
* xref:../nodes/nodes/nodes-sno-worker-nodes.adoc#sno-adding-worker-nodes-to-sno-clusters_add-workers[Adding worker nodes using the OpenShift Cluster Manager]
195195

196196
* xref:../nodes/nodes/nodes-sno-worker-nodes.adoc#adding-worker-nodes-using-the-assisted-installer-api[Adding worker nodes using the Assisted Installer REST API]
197197

198198
* xref:../nodes/nodes/nodes-sno-worker-nodes.adoc#sno-adding-worker-nodes-to-single-node-clusters-manually_add-workers[Manually adding worker nodes to a SNO cluster]
199199

200-
=== Adding worker nodes to clusters managed by the multicluster engine for Kubernetes
200+
=== Adding worker nodes to clusters managed by the multicluster engine for Kubernetes
201201

202202
For clusters managed by the multicluster engine for Kubernetes, you can add worker nodes by using the dedicated multicluster engine console.
203203

@@ -545,7 +545,7 @@ include::modules/machineset-delete-policy.adoc[leveloffset=+2]
545545
include::modules/nodes-scheduler-node-selectors-cluster.adoc[leveloffset=+2]
546546

547547
[id="post-worker-latency-profiles"]
548-
== Improving cluster stability in high latency environments using worker latency profiles
548+
== Improving cluster stability in high latency environments using worker latency profiles
549549

550550
include::snippets/worker-latency-profile-intro.adoc[]
551551

@@ -567,7 +567,7 @@ In a production deployment, it is recommended that you deploy at least three com
567567

568568
For information on infrastructure nodes and which components can run on infrastructure nodes, see xref:../machine_management/creating-infrastructure-machinesets.adoc#creating-infrastructure-machinesets[Creating infrastructure machine sets].
569569

570-
To create an infrastructure node, you can xref:../post_installation_configuration/cluster-tasks.adoc#machineset-creating_post-install-cluster-tasks[use a machine set], xref:../post_installation_configuration/cluster-tasks.adoc#creating-an-infra-node_post-install-cluster-tasks[assign a label to the nodes], or xref:../post_installation_configuration/cluster-tasks.adoc#creating-infra-machines_post-install-cluster-tasks[use a machine config pool].
570+
To create an infrastructure node, you can xref:../post_installation_configuration/cluster-tasks.adoc#machineset-creating_post-install-cluster-tasks[use a machine set], xref:../post_installation_configuration/cluster-tasks.adoc#creating-an-infra-node_post-install-cluster-tasks[assign a label to the nodes], or xref:../post_installation_configuration/cluster-tasks.adoc#creating-infra-machines_post-install-cluster-tasks[use a machine config pool].
571571

572572
For sample machine sets that you can use with these procedures, see xref:../machine_management/creating-infrastructure-machinesets.adoc#creating-infrastructure-machinesets-clouds[Creating machine sets for different clouds].
573573

@@ -706,3 +706,5 @@ include::modules/installation-images-samples-disconnected-mirroring-assist.adoc[
706706
include::modules/installation-restricted-network-samples.adoc[leveloffset=+2]
707707

708708
include::modules/installation-preparing-restricted-cluster-to-gather-support-data.adoc[leveloffset=+2]
709+
710+
include::modules/images-cluster-sample-imagestream-import.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)