Skip to content

Commit cc416c4

Browse files
authored
Merge pull request #64316 from mburke5678/images-fix-errors
Images docs fixes during ROSA review
2 parents 171b53b + 7384990 commit cc416c4

15 files changed

+90
-68
lines changed

modules/cli-installing-cli.adoc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ To check your `PATH`, execute the following command:
133133
$ echo $PATH
134134
----
135135

136-
After you install the OpenShift CLI, it is available using the `oc` command:
136+
.Verification
137137

138+
* After you install the OpenShift CLI, it is available using the `oc` command:
139+
+
138140
[source,terminal]
139141
----
140142
$ oc <command>
@@ -177,8 +179,10 @@ To check your `PATH`, open the command prompt and execute the following command:
177179
C:\> path
178180
----
179181

180-
After you install the OpenShift CLI, it is available using the `oc` command:
182+
.Verification
181183

184+
* After you install the OpenShift CLI, it is available using the `oc` command:
185+
+
182186
[source,terminal]
183187
----
184188
C:\> oc <command>
@@ -226,8 +230,10 @@ To check your `PATH`, open a terminal and execute the following command:
226230
$ echo $PATH
227231
----
228232

229-
After you install the OpenShift CLI, it is available using the `oc` command:
233+
.Verification
230234

235+
* After you install the OpenShift CLI, it is available using the `oc` command:
236+
+
231237
[source,terminal]
232238
----
233239
$ oc <command>

modules/images-configuration-allowed.adoc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ When the `allowedRegistries` parameter is defined, all registries, including the
1818

1919
.Procedure
2020

21-
ifndef::openshift-rosa,openshift-dedicated[]
22-
. Edit the `image.config.openshift.io/cluster` custom resource:
23-
endif::openshift-rosa,openshift-dedicated[]
24-
ifdef::openshift-rosa,openshift-dedicated[]
2521
* Edit the `image.config.openshift.io/cluster` custom resource:
26-
endif::openshift-rosa,openshift-dedicated[]
2722
+
2823
[source,terminal]
2924
----
@@ -67,8 +62,9 @@ Either the `allowedRegistries` parameter or the `blockedRegistries` parameter ca
6762
The Machine Config Operator (MCO) watches the `image.config.openshift.io/cluster` resource for any changes to the registries. When the MCO detects a change, it drains the nodes, applies the change, and uncordons the nodes. After the nodes return to the `Ready` state, the allowed registries list is used to update the image signature policy in the `/host/etc/containers/policy.json` file on each node.
6863
6964
ifndef::openshift-rosa,openshift-dedicated[]
70-
. To check that the registries have been added to the policy file, use the following command on a node:
71-
// cannot create resource "namespaces"
65+
.Verification
66+
67+
* To check that the registries have been added to the policy file, use the following command on a node:
7268
+
7369
[source,terminal]
7470
----

modules/images-configuration-blocked.adoc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ To prevent pod failure, do not add the `registry.redhat.io` and `quay.io` regist
1818

1919
.Procedure
2020

21-
ifndef::openshift-rosa,openshift-dedicated[]
22-
. Edit the `image.config.openshift.io/cluster` custom resource:
23-
endif::openshift-rosa,openshift-dedicated[]
24-
ifdef::openshift-rosa,openshift-dedicated[]
2521
* Edit the `image.config.openshift.io/cluster` custom resource:
26-
endif::openshift-rosa,openshift-dedicated[]
2722
+
2823
[source,terminal]
2924
----
@@ -64,7 +59,9 @@ Either the `blockedRegistries` registry or the `allowedRegistries` registry can
6459
The Machine Config Operator (MCO) watches the `image.config.openshift.io/cluster` resource for any changes to the registries. When the MCO detects a change, it drains the nodes, applies the change, and uncordons the nodes. After the nodes return to the `Ready` state, changes to the blocked registries appear in the `/etc/containers/registries.conf` file on each node.
6560
6661
ifndef::openshift-rosa,openshift-dedicated[]
67-
. To check that the registries have been added to the policy file, use the following command on a node:
62+
.Verification
63+
64+
* To check that the registries have been added to the policy file, use the following command on a node:
6865
// cannot create resource "namespaces"
6966
+
7067
[source,terminal]

modules/images-configuration-insecure.adoc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ Insecure external registries should be avoided to reduce possible security risks
1818

1919
.Procedure
2020

21-
ifndef::openshift-rosa,openshift-dedicated[]
22-
. Edit the `image.config.openshift.io/cluster` custom resource:
23-
endif::openshift-rosa,openshift-dedicated[]
24-
ifdef::openshift-rosa,openshift-dedicated[]
2521
* Edit the `image.config.openshift.io/cluster` custom resource:
26-
endif::openshift-rosa,openshift-dedicated[]
2722
+
2823
[source,terminal]
2924
----
@@ -72,8 +67,9 @@ When the `allowedRegistries` parameter is defined, all registries, including the
7267
The Machine Config Operator (MCO) watches the `image.config.openshift.io/cluster` CR for any changes to the registries, then drains and uncordons the nodes when it detects changes. After the nodes return to the `Ready` state, changes to the insecure and blocked registries appear in the `/etc/containers/registries.conf` file on each node.
7368
7469
ifndef::openshift-rosa,openshift-dedicated[]
75-
. To check that the registries have been added to the policy file, use the following command on a node:
76-
// cannot create resource "namespaces"
70+
.Verification
71+
72+
* To check that the registries have been added to the policy file, use the following command on a node:
7773
+
7874
[source,terminal]
7975
----

modules/images-configuration-shortname.adoc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,7 @@ The `containerRuntimeSearchRegistries` parameter works only with the Podman and
3737

3838
.Procedure
3939

40-
ifndef::openshift-rosa,openshift-dedicated[]
41-
. Edit the `image.config.openshift.io/cluster` custom resource:
42-
endif::openshift-rosa,openshift-dedicated[]
43-
ifdef::openshift-rosa,openshift-dedicated[]
4440
* Edit the `image.config.openshift.io/cluster` custom resource:
45-
endif::openshift-rosa,openshift-dedicated[]
4641
+
4742
[source,terminal]
4843
----
@@ -96,7 +91,9 @@ When the `allowedRegistries` parameter is defined, all registries, including the
9691
====
9792
9893
ifndef::openshift-rosa,openshift-dedicated[]
99-
. To check that the registries have been added, when a node returns to the `Ready` state, use the following command on the node:
94+
.Verification
95+
96+
* To check that the registries have been added, when a node returns to the `Ready` state, use the following command on the node:
10097
+
10198
[source,terminal]
10299
----

modules/images-create-guide-general.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ In addition, use tags in the `FROM` instruction, for example, `rhel:rhel7`, to m
1616
[discrete]
1717
== Maintain compatibility within tags
1818

19-
When tagging your own images, try to maintain backwards compatibility within a tag. For example, if you provide an image named `foo` and it currently includes version `1.0`, you might provide a tag of `foo:v1`. When you update the image, as long as it continues to be compatible with the original image, you can continue to tag the new image `foo:v1`, and downstream consumers of this tag are able to get updates without being broken.
19+
When tagging your own images, try to maintain backwards compatibility within a tag. For example, if you provide an image named `image` and it currently includes version `1.0`, you might provide a tag of `image:v1`. When you update the image, as long as it continues to be compatible with the original image, you can continue to tag the new image `image:v1`, and downstream consumers of this tag are able to get updates without being broken.
2020

21-
If you later release an incompatible update, then switch to a new tag, for example `foo:v2`. This allows downstream consumers to move up to the new version at will, but not be inadvertently broken by the new incompatible image. Any downstream consumer using `foo:latest` takes on the risk of any incompatible changes being introduced.
21+
If you later release an incompatible update, then switch to a new tag, for example `image:v2`. This allows downstream consumers to move up to the new version at will, but not be inadvertently broken by the new incompatible image. Any downstream consumer using `image:latest` takes on the risk of any incompatible changes being introduced.
2222

2323
[discrete]
2424
== Avoid multiple processes

modules/images-imagestream-remove-tag.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ For example:
2020
+
2121
[source,terminal]
2222
----
23-
$ oc tag -d python:3.5
23+
$ oc tag -d python:3.6
2424
----
2525
+
2626
.Example output
2727
[source,terminal]
2828
----
29-
Deleted tag default/python:3.5.
29+
Deleted tag default/python:3.6
3030
----

modules/images-triggering-updates-imagestream-changes-kubernetes-about.adoc

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,29 @@ The annotation is defined as follows:
1212

1313
[source,yaml]
1414
----
15-
Key: image.openshift.io/triggers
16-
Value:
17-
[
18-
{
19-
"from": {
20-
"kind": "ImageStreamTag", <1>
21-
"name": "example:latest", <2>
22-
"namespace": "myapp" <3>
23-
},
24-
"fieldPath": "spec.template.spec.containers[?(@.name==\"web\")].image", <4>
25-
"paused": false <5>
26-
},
27-
...
28-
]
15+
apiVersion: v1
16+
kind: Pod
17+
metadata:
18+
annotations:
19+
image.openshift.io/triggers:
20+
[
21+
{
22+
"from": {
23+
"kind": "ImageStreamTag", <1>
24+
"name": "example:latest", <2>
25+
"namespace": "myapp" <3>
26+
},
27+
"fieldPath": "spec.template.spec.containers[?(@.name==\"web\")].image", <4>
28+
"paused": false <5>
29+
},
30+
# ...
31+
]
32+
# ...
2933
----
3034
<1> Required: `kind` is the resource to trigger from must be `ImageStreamTag`.
3135
<2> Required: `name` must be the name of an image stream tag.
3236
<3> Optional: `namespace` defaults to the namespace of the object.
33-
<4> Required: `fieldPath` is the JSON path to change. This field is limited and accepts only a JSON path expression that precisely matches a container by ID or index. For pods, the JSON path is "spec.containers[?(@.name='web')].image".
37+
<4> Required: `fieldPath` is the JSON path to change. This field is limited and accepts only a JSON path expression that precisely matches a container by ID or index. For pods, the JSON path is `spec.containers[?(@.name='web')].image`.
3438
<5> Optional: `paused` is whether or not the trigger is paused, and the default value is `false`. Set `paused` to `true` to temporarily disable this trigger.
3539

3640
When one of the core Kubernetes resources contains both a pod template and this annotation, {product-title} attempts to update the object by using the image currently associated with the image stream tag that is referenced by trigger. The update is performed against the `fieldPath` specified.

modules/images-triggering-updates-imagestream-changes-kubernetes-cli.adoc

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,17 @@ When adding an image trigger to deployments, you can use the `oc set triggers` c
1717
----
1818
$ oc set triggers deploy/example --from-image=example:latest -c web
1919
----
20-
20+
+
21+
.Example deployment with trigger annotation
22+
+
23+
[source,yaml]
24+
----
25+
apiVersion: apps/v1
26+
kind: Deployment
27+
metadata:
28+
annotations:
29+
image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"example:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"container\")].image"}]'
30+
# ...
31+
----
32+
+
2133
Unless the deployment is paused, this pod template update automatically causes a deployment to occur with the new image value.

modules/images-using-imagestream-tags.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ The following image stream tag is from an `ImageStream` object:
1414

1515
[source,yaml]
1616
----
17+
kind: ImageStream
18+
apiVersion: image.openshift.io/v1
19+
metadata:
20+
name: my-image-stream
21+
# ...
1722
tags:
1823
- items:
1924
- created: 2017-09-02T10:15:09Z
@@ -25,6 +30,7 @@ The following image stream tag is from an `ImageStream` object:
2530
generation: 1
2631
image: sha256:47463d94eb5c049b2d23b03a9530bf944f8f967a0fe79147dd6b9135bf7dd13d
2732
tag: latest
33+
# ...
2834
----
2935

3036
Image stream tags can be permanent tags or tracking tags.

0 commit comments

Comments
 (0)