Deploying Quay Instances on OpenShift
Table of Contents
Overview
The Quay Operator is preinstalled and managed centrally on our OpenShift cluster.
It enables you to deploy your own Red Hat Quay container registry instances in a self-service way.
You can create and manage isolated Quay instances (with their own Redis, Postgres, and storage) directly in your namespace by defining a QuayRegistry custom resource.
Each Quay instance is fully isolated and runs under your project.
Prerequisites
Before creating a Quay instance, ensure you have:
- Access to a dedicated OpenShift project/namespace
- Familiarity with basic
ocorkubectlcommands - The Quay Operator is already installed and managed cluster-wide (no need to install it yourself)
- High resource quota available (11 CPU cores, 26Gb Memory, 9 Pods, 6 Services)
Creating a Quay Registry Instance
For a basic installation without Horizontal Pod Autoscaling, create a QuayRegistry custom resource with the following YAML manifest:
kind: QuayRegistry
apiVersion: quay.redhat.com/v1
metadata:
name: <<[your-quay-instance-name]>>
namespace: <<[your-namespace]>>
spec:
components:
- kind: clair
managed: true
- kind: postgres
managed: true
- kind: objectstorage
managed: true
- kind: redis
managed: true
- kind: horizontalpodautoscaler
managed: false
- kind: route
managed: true
- kind: mirror
managed: true
- kind: monitoring
managed: true
- kind: tls
managed: true
- kind: quay
managed: true
- kind: clairpostgres
managed: true
Creating the initial user
Please follow the official guide to create the initial user.
Advanced Installation
It is also possible to pre-create a config and refer to it before installing quay.
First, create the yaml file with the desired modifications, for example:
FEATURE_USER_INITIALIZE: true
Then, create it in your OpenShift project as a secret:
oc create secret generic --from-file config.yaml=../config.yaml config-bundle-secret
Afterwards, refer to it from your Quay Registry definition manifest:
kind: QuayRegistry
apiVersion: quay.redhat.com/v1
metadata:
name: <<[your-quay-instance-name]>>
namespace: <<[your-namespace]>>
spec:
configBundleSecret: config-bundle-secret
components:
- kind: clair
managed: true
- kind: postgres
managed: true
- kind: objectstorage
managed: true
- kind: redis
managed: true
- kind: horizontalpodautoscaler
managed: false
- kind: route
managed: true
- kind: mirror
managed: true
- kind: monitoring
managed: true
- kind: tls
managed: true
- kind: quay
managed: true
- kind: clairpostgres
managed: true
After installation, a new secret will be created that merges the defined config into the default config values, named: [quay-registry-name]-quay-config-secret-[id]
For more information on advanced installations, please refer to the official documentation:
Deploying Quay Registry