:_mod-docs-content-type: ASSEMBLY
[id="configuring-registry-operator"]
= Image Registry Operator in {product-title}
include::_attributes/common-attributes.adoc[]
:context: configuring-registry-operator

toc::[]

[id="image-registry-on-cloud"]
[role="_abstract"]
ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
== Image Registry on cloud platforms and OpenStack
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
ifdef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
== Image Registry on {product-title}
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]

The Image Registry Operator installs a single instance of the {product-registry} and manages all registry configuration, including setting up registry storage.

ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
[NOTE]
====
Storage is only automatically configured when you install an installer-provisioned infrastructure cluster on {aws-short}, {azure-short}, {gcp-short}, {ibm-name}, or {rh-openstack}.

When you install or upgrade an installer-provisioned infrastructure cluster on {aws-short}, {azure-short}, {gcp-short}, {ibm-name}, or {rh-openstack}, the Image Registry Operator sets the `spec.storage.managementState` parameter to `Managed`. If the `spec.storage.managementState` parameter is set to `Unmanaged`, the Image Registry Operator takes no action related to storage.
====
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]

After the control plane deploys in the management cluster, the Operator creates a default `configs.imageregistry.operator.openshift.io` custom resource (CR) instance based on configuration detected in the cluster.

If insufficient information is available to define a complete `configs.imageregistry.operator.openshift.io` CR, the incomplete resource is defined and the Operator updates the resource status with information about what is missing.

ifdef::openshift-rosa-hcp[]
The Image Registry Operator runs in the `CONTROL_PLANE_NAMESPACE` environment variable of the management cluster, and manages the registry instance in the `openshift-image-registry` namespace of the cluster. All configuration and workload resources for the registry reside in that namespace.
endif::openshift-rosa-hcp[]
ifdef::openshift-rosa[]
The Image Registry Operator runs in the `openshift-image-registry` namespace, and manages the registry instance in that location. All configuration and workload resources for the registry reside in that namespace.
endif::openshift-rosa[]

ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
[IMPORTANT]
====
The Image Registry Operator's behavior for managing the pruner is orthogonal to the `managementState` specified on the `ClusterOperator` object for the Image Registry Operator. If the Image Registry Operator is not in the `Managed` state, the image pruner can still be configured and managed by the `Pruning` custom resource.

However, the `managementState` of the Image Registry Operator alters the behavior of the deployed image pruner job:

* `Managed`: the `--prune-registry` flag for the image pruner is set to `true`.
* `Removed`: the `--prune-registry` flag for the image pruner is set to `false`, meaning the image pruner job only prunes image metadata in etcd.
====
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]

ifndef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
[id="image-registry-on-bare-metal-vsphere"]
== Image Registry on bare metal, Nutanix, and vSphere

include::modules/registry-removed.adoc[leveloffset=+2]

include::modules/registry-operator-distribution-across-availability-zones.adoc[leveloffset=+1]

ifndef::openshift-rosa-portal[]
[role="_additional-resources"]
== Additional resources

* xref:../nodes/scheduling/nodes-scheduler-pod-topology-spread-constraints.adoc#nodes-scheduler-pod-topology-spread-constraints[Configuring pod topology spread constraints]
endif::openshift-rosa-portal[]

include::modules/registry-operator-configuration-resource-overview.adoc[leveloffset=+1]

include::modules/registry-operator-default-crd.adoc[leveloffset=+1]

include::modules/images-configuration-cas.adoc[leveloffset=+1]

include::modules/registry-operator-config-resources-storage-credentials.adoc[leveloffset=+1]

[role="_additional-resources"]
== Additional resources

* xref:../registry/configuring_registry_storage/configuring-registry-storage-aws-user-infrastructure.adoc#configuring-registry-storage-aws-user-infrastructure[Configuring the registry for AWS user-provisioned infrastructure]
* xref:../registry/configuring_registry_storage/configuring-registry-storage-gcp-user-infrastructure.adoc#configuring-registry-storage-gcp-user-infrastructure[Configuring the registry for {gcp-short} user-provisioned infrastructure]
* xref:../registry/configuring_registry_storage/configuring-registry-storage-azure-user-infrastructure.adoc#configuring-registry-storage-azure-user-infrastructure[Configuring the registry for Azure user-provisioned infrastructure]
* xref:../registry/configuring_registry_storage/configuring-registry-storage-baremetal.adoc#configuring-registry-storage-baremetal[Configuring the registry for bare metal]
* xref:../registry/configuring_registry_storage/configuring-registry-storage-vsphere.adoc#configuring-registry-storage-vsphere[Configuring the registry for vSphere]
* xref:../registry/configuring_registry_storage/configuring-registry-storage-osp.adoc#configuring-registry-storage-openstack[Configuring the registry for {rh-openstack}]
* xref:../registry/configuring_registry_storage/configuring-registry-storage-rhodf.adoc#configuring-registry-storage-rhodf[Configuring the registry for {rh-storage-first}]
* xref:../registry/configuring_registry_storage/configuring-registry-storage-nutanix.adoc#configuring-registry-storage-nutanix[Configuring the registry for Nutanix]
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
