Chapter 5. Configuring resources for managed components on OpenShift Container Platform You can manually adjust the resources on Red Hat Quay on OpenShift Container Platform for the following components that have running pods: quay clair mirroring clairpostgres postgres This feature allows users to run smaller test clusters, or to request more resources upfront in order to avoid partially degraded Quay pods. Limitations and requests can be set in accordance with Kubernetes resource units . The following components should not be set lower than their minimum requirements. This can cause issues with your deployment and, in some cases, result in failure of the pod's deployment. quay : Minimum of 6 GB, 2vCPUs clair : Recommended of 2 GB memory, 2 vCPUs clairpostgres : Minimum of 200 MB You can configure resource requests on the OpenShift Container Platform UI, or by directly by updating the QuayRegistry YAML. Important The default values set for these components are the suggested values. Setting resource requests too high or too low might lead to inefficient resource utilization, or performance degradation, respectively. 5.1. Configuring resource requests by using the OpenShift Container Platform UI Use the following procedure to configure resources by using the OpenShift Container Platform UI. Procedure On the OpenShift Container Platform developer console, click Operators Installed Operators Red Hat Quay . Click QuayRegistry . Click the name of your registry, for example, example-registry . Click YAML . In the spec.components field, you can override the resource of the quay , clair , mirroring clairpostgres , and postgres resources by setting values for the .overrides.resources.limits and the overrides.resources.requests fields. For example: spec: components: - kind: clair managed: true overrides: resources: limits: cpu: "5" # Limiting to 5 CPU (equivalent to 5000m or 5000 millicpu) memory: "18Gi" # Limiting to 18 Gibibytes of memory requests: cpu: "4" # Requesting 4 CPU memory: "4Gi" # Requesting 4 Gibibytes of memory - kind: postgres managed: true overrides: resources: limits: {} 1 requests: cpu: "700m" # Requesting 700 millicpu or 0.7 CPU memory: "4Gi" # Requesting 4 Gibibytes of memory - kind: mirror managed: true overrides: resources: limits: 2 requests: cpu: "800m" # Requesting 800 millicpu or 0.8 CPU memory: "1Gi" # Requesting 1 Gibibyte of memory - kind: quay managed: true overrides: resources: limits: cpu: "4" # Limiting to 4 CPU memory: "10Gi" # Limiting to 10 Gibibytes of memory requests: cpu: "4" # Requesting 4 CPU memory: "10Gi" # Requesting 10 Gibi of memory - kind: clairpostgres managed: true overrides: resources: limits: cpu: "800m" # Limiting to 800 millicpu or 0.8 CPU memory: "3Gi" # Limiting to 3 Gibibytes of memory requests: {} 1 Setting the limits or requests fields to {} uses the default values for these resources. 2 Leaving the limits or requests field empty puts no limitations on these resources. 5.2. Configuring resource requests by editing the QuayRegistry YAML You can re-configure Red Hat Quay to configure resource requests after you have already deployed a registry. This can be done by editing the QuayRegistry YAML file directly and then re-deploying the registry. Procedure Optional: If you do not have a local copy of the QuayRegistry YAML file, enter the following command to obtain it: USD oc get quayregistry <registry_name> -n <namespace> -o yaml > quayregistry.yaml Open the quayregistry.yaml created from Step 1 of this procedure and make the desired changes. For example: - kind: quay managed: true overrides: resources: limits: {} requests: cpu: "0.7" # Requesting 0.7 CPU (equivalent to 500m or 500 millicpu) memory: "512Mi" # Requesting 512 Mebibytes of memory Save the changes. Apply the Red Hat Quay registry using the updated configurations by running the following command: USD oc replace -f quayregistry.yaml Example output quayregistry.quay.redhat.com/example-registry replaced

Commands:
spec: components: - kind: clair managed: true overrides: resources: limits: cpu: "5" # Limiting to 5 CPU (equivalent to 5000m or 5000 millicpu) memory: "18Gi" # Limiting to 18 Gibibytes of memory requests: cpu: "4" # Requesting 4 CPU memory: "4Gi" # Requesting 4 Gibibytes of memory - kind: postgres managed: true overrides: resources: limits: {} 1 requests: cpu: "700m" # Requesting 700 millicpu or 0.7 CPU memory: "4Gi" # Requesting 4 Gibibytes of memory - kind: mirror managed: true overrides: resources: limits: 2 requests: cpu: "800m" # Requesting 800 millicpu or 0.8 CPU memory: "1Gi" # Requesting 1 Gibibyte of memory - kind: quay managed: true overrides: resources: limits: cpu: "4" # Limiting to 4 CPU memory: "10Gi" # Limiting to 10 Gibibytes of memory requests: cpu: "4" # Requesting 4 CPU memory: "10Gi" # Requesting 10 Gibi of memory - kind: clairpostgres managed: true overrides: resources: limits: cpu: "800m" # Limiting to 800 millicpu or 0.8 CPU memory: "3Gi" # Limiting to 3 Gibibytes of memory requests: {}
oc get quayregistry <registry_name> -n <namespace> -o yaml > quayregistry.yaml
- kind: quay managed: true overrides: resources: limits: {} requests: cpu: "0.7" # Requesting 0.7 CPU (equivalent to 500m or 500 millicpu) memory: "512Mi" # Requesting 512 Mebibytes of memory
oc replace -f quayregistry.yaml
quayregistry.quay.redhat.com/example-registry replaced