Skip to content

Commit f039841

Browse files
authored
Merge pull request #70201 from stevsmit/OCPBUGS-23961
Updates various commands for IR docs
2 parents 1fabe30 + 868762d commit f039841

File tree

3 files changed

+97
-11
lines changed

3 files changed

+97
-11
lines changed

modules/images-configuration-allowed.adoc

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,48 @@ The Machine Config Operator (MCO) watches the `image.config.openshift.io/cluster
6464
ifndef::openshift-rosa,openshift-dedicated[]
6565
.Verification
6666

67-
* To check that the registries have been added to the policy file, use the following command on a node:
67+
* Enter the following command to obtain a list of your nodes:
6868
+
6969
[source,terminal]
7070
----
71-
$ cat /host/etc/containers/policy.json
71+
$ oc get nodes
72+
----
73+
+
74+
Example output
75+
+
76+
[source,terminal]
77+
----
78+
NAME STATUS ROLES AGE VERSION
79+
<node_name> Ready control-plane,master 37m v1.27.8+4fab27b
80+
----
81+
82+
. Run the following command to enter debug mode on the node:
83+
+
84+
[source,terminal]
85+
----
86+
$ oc debug node/<node_name>
87+
----
88+
89+
. When prompted, enter `chroot/host` into the terminal:
90+
+
91+
[source,terminal]
92+
----
93+
sh-4.4# chroot/host
94+
----
95+
96+
. Enter the following command to check that the registries have been added to the policy file:
97+
+
98+
[source,terminal]
99+
----
100+
sh-5.1# cat /etc/containers/policy.json | jq '.'
72101
----
73102
+
74103
The following policy indicates that only images from the example.com, quay.io, and registry.redhat.io registries are permitted for image pulls and pushes:
75104
+
76105
.Example image signature policy file
77106
[%collapsible]
78107
====
79-
[source,terminal]
108+
[source,text]
80109
----
81110
{
82111
"default":[
@@ -168,7 +197,7 @@ If your cluster uses the `registrySources.insecureRegistries` parameter, ensure
168197

169198
For example:
170199

171-
[source,yml]
200+
[source,yaml]
172201
----
173202
spec:
174203
registrySources:

modules/images-configuration-blocked.adoc

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,46 @@ The Machine Config Operator (MCO) watches the `image.config.openshift.io/cluster
6161
ifndef::openshift-rosa,openshift-dedicated[]
6262
.Verification
6363

64-
* To check that the registries have been added to the policy file, use the following command on a node:
65-
// cannot create resource "namespaces"
64+
* Enter the following command to obtain a list of your nodes:
6665
+
6766
[source,terminal]
6867
----
69-
$ cat /host/etc/containers/registries.conf
68+
$ oc get nodes
69+
----
70+
+
71+
Example output
72+
+
73+
[source,terminal]
74+
----
75+
NAME STATUS ROLES AGE VERSION
76+
<node_name> Ready control-plane,master 37m v1.27.8+4fab27b
77+
----
78+
79+
. Run the following command to enter debug mode on the node:
80+
+
81+
[source,terminal]
82+
----
83+
$ oc debug node/<node_name>
84+
----
85+
86+
. When prompted, enter `chroot/host` into the terminal:
87+
+
88+
[source,terminal]
89+
----
90+
sh-4.4# chroot/host
91+
----
92+
93+
. Enter the following command to check that the registries have been added to the policy file:
94+
+
95+
[source,terminal]
96+
----
97+
sh-5.1# cat etc/containers/registries.conf
7098
----
7199
+
72100
The following example indicates that images from the `untrusted.com` registry are prevented for image pulls and pushes:
73101
+
74102
.Example output
75-
[source,terminal]
103+
[source,text]
76104
----
77105
unqualified-search-registries = ["registry.access.redhat.com", "docker.io"]
78106

modules/images-configuration-shortname.adoc

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,45 @@ When the `allowedRegistries` parameter is defined, all registries, including the
9393
ifndef::openshift-rosa,openshift-dedicated[]
9494
.Verification
9595

96-
* To check that the registries have been added, when a node returns to the `Ready` state, use the following command on the node:
96+
* Enter the following command to obtain a list of your nodes:
9797
+
9898
[source,terminal]
9999
----
100-
$ cat /host/etc/containers/registries.conf.d/01-image-searchRegistries.conf
100+
$ oc get nodes
101101
----
102102
+
103-
.Example output
103+
Example output
104+
+
104105
[source,terminal]
105106
----
107+
NAME STATUS ROLES AGE VERSION
108+
<node_name> Ready control-plane,master 37m v1.27.8+4fab27b
109+
----
110+
111+
. Run the following command to enter debug mode on the node:
112+
+
113+
[source,terminal]
114+
----
115+
$ oc debug node/<node_name>
116+
----
117+
118+
. When prompted, enter `chroot/host` into the terminal:
119+
+
120+
[source,terminal]
121+
----
122+
sh-4.4# chroot/host
123+
----
124+
125+
. Enter the following command to check that the registries have been added to the policy file:
126+
+
127+
[source,terminal]
128+
----
129+
sh-5.1# cat /etc/containers/registries.conf.d/01-image-searchRegistries.conf
130+
----
131+
+
132+
.Example output
133+
[source,text]
134+
----
106135
unqualified-search-registries = ['reg1.io', 'reg2.io', 'reg3.io']
107136
----
108137
endif::openshift-rosa,openshift-dedicated[]

0 commit comments

Comments
 (0)