From 9cf9eca95c18507211e6994d9620ea5ffc2ea059 Mon Sep 17 00:00:00 2001 From: bmcelvee Date: Mon, 11 Jul 2022 13:15:23 -0400 Subject: [PATCH] OSDOCS-3602: Document image registry distribution across availability zones --- ...istribution-across-availability-zones.adoc | 57 +++++++++++++++++++ registry/configuring-registry-operator.adoc | 28 ++++----- 2 files changed, 69 insertions(+), 16 deletions(-) create mode 100644 modules/registry-operator-distribution-across-availability-zones.adoc diff --git a/modules/registry-operator-distribution-across-availability-zones.adoc b/modules/registry-operator-distribution-across-availability-zones.adoc new file mode 100644 index 0000000000..920ad3a68b --- /dev/null +++ b/modules/registry-operator-distribution-across-availability-zones.adoc @@ -0,0 +1,57 @@ +// Module included in the following assemblies: +// +// * openshift_images/configuring-registry-operator.adoc + + +[id="registry-operator-distribution-across-availability-zones_{context}"] += Image Registry Operator distribution across availability zones + +The default configuration of the Image Registry Operator spreads image registry pods across topology zones to prevent delayed recovery times in case of a complete zone failure where all pods are impacted. + +The Image Registry Operator defaults to the following when deployed with a zone-related topology constraint: + +.Image Registry Operator deployed with a zone related topology constraint +[source,yaml] +---- + topologySpreadConstraints: + - labelSelector: + matchLabels: + docker-registry: default + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule + - labelSelector: + matchLabels: + docker-registry: default + maxSkew: 1 + topologyKey: node-role.kubernetes.io/worker + whenUnsatisfiable: DoNotSchedule + - labelSelector: + matchLabels: + docker-registry: default + maxSkew: 1 + topologyKey: topology.kubernetes.io/zone + whenUnsatisfiable: DoNotSchedule +---- + +The Image Registry Operator defaults to the following when deployed without a zone-related topology constraint, which applies to bare metal and vSphere instances: + +.Image Registry Operator deployed without a zone related topology constraint +[source,yaml] +---- + topologySpreadConstraints: + - labelSelector: + matchLabels: + docker-registry: default + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule + - labelSelector: + matchLabels: + docker-registry: default + maxSkew: 1 + topologyKey: node-role.kubernetes.io/worker + whenUnsatisfiable: DoNotSchedule +---- + +A cluster administrator can override the default `topologySpreadConstraints` by configuring the `configs.imageregistry.operator.openshift.io/cluster` spec file. In that case, only the constraints you provide apply. \ No newline at end of file diff --git a/registry/configuring-registry-operator.adoc b/registry/configuring-registry-operator.adoc index cc1e6c56a8..a94361050e 100644 --- a/registry/configuring-registry-operator.adoc +++ b/registry/configuring-registry-operator.adoc @@ -9,31 +9,20 @@ toc::[] [id="image-registry-on-cloud"] == Image Registry on cloud platforms and OpenStack -The Image Registry Operator installs a single instance of the {product-title} -registry, and manages all registry configuration, including setting up -registry storage. +The Image Registry Operator installs a single instance of the {product-title} registry, and manages all registry configuration, including setting up registry storage. [NOTE] ==== -Storage is only automatically configured when you install an -installer-provisioned infrastructure cluster on AWS, GCP, Azure, or OpenStack. +Storage is only automatically configured when you install an installer-provisioned infrastructure cluster on AWS, GCP, Azure, or OpenStack. When you install or upgrade an installer-provisioned infrastructure cluster on AWS or Azure, 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. ==== -After the control plane deploys, the Operator will create a default -`configs.imageregistry.operator.openshift.io` resource instance based on -configuration detected in the cluster. +After the control plane deploys, the Operator creates a default `configs.imageregistry.operator.openshift.io` resource instance based on configuration detected in the cluster. -If insufficient information is available to define a complete -`configs.imageregistry.operator.openshift.io` resource, the incomplete resource -will be defined and the Operator will update the resource status with -information about what is missing. - -The Image Registry Operator runs in the `openshift-image-registry` namespace, -and manages the registry instance in that location as well. All configuration -and workload resources for the registry reside in that namespace. +If insufficient information is available to define a complete `configs.imageregistry.operator.openshift.io` resource, the incomplete resource is defined and the Operator updates the resource status with information about what is missing. +The Image Registry Operator runs in the `openshift-image-registry` namespace, and manages the registry instance in that location as well. All configuration and workload resources for the registry reside in that namespace. [IMPORTANT] ==== @@ -51,6 +40,13 @@ However, the `managementState` of the Image Registry Operator alters the behavio include::modules/registry-removed.adoc[leveloffset=+2] +include::modules/registry-operator-distribution-across-availability-zones.adoc[leveloffset=+1] + +[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] + include::modules/registry-operator-configuration-resource-overview.adoc[leveloffset=+1] include::modules/registry-operator-default-crd.adoc[leveloffset=+1]