Skip to content

Commit 6c11764

Browse files
committed
OCPBUGS-14116: Improving registries.conf explanation
1 parent e975855 commit 6c11764

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed

modules/ztp-configuring-the-cluster-for-a-disconnected-environment.adoc

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[id="ztp-configuring-the-cluster-for-a-disconnected-environment_{context}"]
77
= Configuring the hub cluster to use a disconnected mirror registry
88

9-
You can configure the hub cluster to use a disconnected mirror registry for a disconnected environment.
9+
You can configure the hub cluster to use a disconnected mirror registry for a disconnected environment.
1010

1111
.Prerequisites
1212

@@ -28,23 +28,32 @@ If you enable TLS for the HTTP server, you must confirm the root certificate is
2828
apiVersion: v1
2929
kind: ConfigMap
3030
metadata:
31-
name: assisted-installer-mirror-config
32-
namespace: assisted-installer
31+
name: assisted-installer-config-map
32+
namespace: "<infrastructure_operator_namespace>" <1>
3333
labels:
3434
app: assisted-service
3535
data:
36-
ca-bundle.crt: <certificate> <1>
37-
registries.conf: | <2>
36+
ca-bundle.crt: | <2>
37+
-----BEGIN CERTIFICATE-----
38+
<certificate_contents>
39+
-----END CERTIFICATE-----
40+
41+
registries.conf: | <3>
3842
unqualified-search-registries = ["registry.access.redhat.com", "docker.io"]
3943

4044
[[registry]]
41-
location = <mirror_registry_url> <3>
42-
insecure = false
43-
mirror-by-digest-only = true
45+
prefix = ""
46+
location = "quay.io/example-repository" <4>
47+
mirror-by-digest-only = true
48+
49+
[[registry.mirror]]
50+
location = "mirror1.registry.corp.com:5000/example-repository" <5>
4451
----
45-
<1> The mirror registry’s certificate used when creating the mirror registry.
46-
<2> The configuration file for the mirror registry. The mirror registry configuration adds mirror information to `/etc/containers/registries.conf` in the Discovery image. The mirror information is stored in the `imageContentSources` section of the `install-config.yaml` file when passed to the installation program. The Assisted Service pod running on the HUB cluster fetches the container images from the configured mirror registry.
47-
<3> The URL of the mirror registry.
52+
<1> The `ConfigMap` namespace must be the same as the namespace of the Infrastructure Operator.
53+
<2> The mirror registry’s certificate that is used when creating the mirror registry.
54+
<3> The configuration file for the mirror registry. The mirror registry configuration adds mirror information to the `/etc/containers/registries.conf` file in the discovery image. The mirror information is stored in the `imageContentSources` section of the `install-config.yaml` file when the information is passed to the installation program. The Assisted Service pod that runs on the hub cluster fetches the container images from the configured mirror registry.
55+
<4> The URL of the mirror registry. You must use the URL from the `imageContentSources` section by running the `oc adm release mirror` command when you configure the mirror registry. For more information, see the _Mirroring the OpenShift Container Platform image repository_ section.
56+
<5> The registries defined in the `registries.conf` file must be scoped by repository, not by registry. In this example, both the `quay.io/example-repository` and the `mirror1.registry.corp.com:5000/example-repository` repositories are scoped by the `example-repository` repository.
4857
+
4958
This updates `mirrorRegistryRef` in the `AgentServiceConfig` custom resource, as shown below:
5059
+

scalability_and_performance/ztp_far_edge/ztp-preparing-the-hub-cluster.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ include::modules/ztp-enabling-assisted-installer-service-on-bare-metal.adoc[leve
3434

3535
include::modules/ztp-configuring-the-cluster-for-a-disconnected-environment.adoc[leveloffset=+1]
3636

37+
[role="_additional-resources"]
38+
.Additional resources
39+
40+
* xref:../../installing/disconnected_install/installing-mirroring-installation-images.adoc#installation-mirror-repository_installing-mirroring-installation-images[Mirroring the OpenShift Container Platform image repository]
41+
3742
include::modules/ztp-configuring-the-hub-cluster-to-use-unauthenticated-registries.adoc[leveloffset=+1]
3843

3944
include::modules/ztp-preparing-the-hub-cluster-for-ztp.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)