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.
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 Copy linkLink copied to clipboard!
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.componentsfield, you can override the resource of thequay,clair,mirroringclairpostgres, andpostgresresources by setting values for the.overrides.resources.limitsand theoverrides.resources.requestsfields. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.2. Configuring resource requests by editing the QuayRegistry YAML Copy linkLink copied to clipboard!
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
QuayRegistryYAML file, enter the following command to obtain it:oc get quayregistry <registry_name> -n <namespace> -o yaml > quayregistry.yaml
$ oc get quayregistry <registry_name> -n <namespace> -o yaml > quayregistry.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Open the
quayregistry.yamlcreated from Step 1 of this procedure and make the desired changes. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Save the changes.
Apply the Red Hat Quay registry using the updated configurations by running the following command:
oc replace -f quayregistry.yaml
$ oc replace -f quayregistry.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
quayregistry.quay.redhat.com/example-registry replaced
quayregistry.quay.redhat.com/example-registry replacedCopy to Clipboard Copied! Toggle word wrap Toggle overflow