Chapter 8. Required configuration fields
Red Hat Quay requires a minimal set of configuration fields to operator correctly. These fields define essential aspects of your deployment, such as how the registry is accessed, where image content is stored, how metadata is persisted, and how background services such as logs are managed.
The required configuration fields fall into five main categories:
- General required configuration fields. Core fields such as the authentication type, URL scheme, server hostname, database secret key, and secret key are covered in this section.
- Database configuration fields. Red Hat Quay requires a PostgreSQL relational database to store metadata about repositories, users, teams, and tags.
- Object storage configuration fields. Object storage define the backend where container image blobs and manifests are stored. Your storage backend must be supported by Red Hat Quay, such as Ceph/RadosGW,AWS S3 storage, Google Cloud Storage, Nutanix, and so on.
- Redis configuration fields. Redis is used as a backend for data such as push logs, user notifications, and other operations.
8.1. General required configuration fields Copy linkLink copied to clipboard!
The following table describes the required configuration fields for a Red Hat Quay deployment:
Field | Type | Description |
---|---|---|
AUTHENTICATION_TYPE | String |
The authentication engine to use for credential authentication. |
PREFERRED_URL_SCHEME | String |
The URL scheme to use when accessing Red Hat Quay. |
SERVER_HOSTNAME | String |
The URL at which Red Hat Quay is accessible, without the scheme. |
DATABASE_SECRET_KEY | String |
Key used to encrypt sensitive fields within the database. This value should never be changed once set, otherwise all reliant fields, for example, repository mirror username and password configurations, are invalidated. |
SECRET_KEY | String | Key used to encrypt the session cookie and the CSRF token needed for correct interpretation of the user session. The value should not be changed when set. Should be persistent across all Red Hat Quay instances. If not persistent across all instances, login failures and other errors related to session persistence might occur. |
SETUP_COMPLETE | Boolean |
This is an artifact left over from earlier versions of the software and currently it must be specified with a value of |
General required fields example
8.2. Database configuration fields Copy linkLink copied to clipboard!
This section describes the database configuration fields available for Red Hat Quay deployments.
8.2.1. Database URI Copy linkLink copied to clipboard!
With Red Hat Quay, connection to the database is configured by using the required DB_URI
field.
The following table describes the DB_URI
configuration field:
Field | Type | Description |
---|---|---|
DB_URI | String | The URI for accessing the database, including any credentials.
Example postgresql://quayuser:quaypass@quay-server.example.com:5432/quay |
Database URI example
# ... DB_URI: postgresql://quayuser:quaypass@quay-server.example.com:5432/quay # ...
# ...
DB_URI: postgresql://quayuser:quaypass@quay-server.example.com:5432/quay
# ...
8.2.2. Database connection arguments Copy linkLink copied to clipboard!
Optional connection arguments are configured by the DB_CONNECTION_ARGS
parameter. Some of the key-value pairs defined under DB_CONNECTION_ARGS
are generic, while others are database specific.
Field | Type | Description |
---|---|---|
DB_CONNECTION_ARGS | Object | Optional connection arguments for the database, such as timeouts and SSL/TLS. |
.autorollback | Boolean |
Whether to use thread-local connections. |
.threadlocals | Boolean |
Whether to use auto-rollback connections. |
Database connection arguments example
8.2.2.1. SSL/TLS connection arguments Copy linkLink copied to clipboard!
With SSL/TLS, configuration depends on the database you are deploying.
The sslmode
option determines whether, or with, what priority a secure SSL/TLS TCP/IP connection will be negotiated with the server. There are six modes:
Mode | Description |
---|---|
sslmode | Determines whether, or with, what priority a secure SSL/TLS or TCP/IP connection is negotiated with the server. |
*: disable | Your configuration only tries non-SSL/TLS connections. |
*: allow | Your configuration first tries a non-SSL/TLS connection. Upon failure, tries an SSL/TLS connection. |
*: prefer | Your configuration first tries an SSL/TLS connection. Upon failure, tries a non-SSL/TLS connection. |
*: require | Your configuration only tries an SSL/TLS connection. If a root CA file is present, it verifies the certificate in the same way as if verify-ca was specified. |
*: verify-ca | Your configuration only tries an SSL/TLS connection, and verifies that the server certificate is issued by a trusted certificate authority (CA). |
*: verify-full | Only tries an SSL/TLS connection, and verifies that the server certificate is issued by a trusted CA and that the requested server hostname matches that in the certificate. |
For more information on the valid arguments for PostgreSQL, see Database Connection Control Functions.
PostgreSQL SSL/TLS configuration
# ... DB_CONNECTION_ARGS: sslmode: <value> sslrootcert: path/to/.postgresql/root.crt # ...
# ...
DB_CONNECTION_ARGS:
sslmode: <value>
sslrootcert: path/to/.postgresql/root.crt
# ...
8.3. Storage object configuration fields Copy linkLink copied to clipboard!
Storage fields define the backend where container image blobs and manifests are stored. The following storage providers are supported by Red Hat Quay:
- Amazon Web Services (AWS) S3
- AWS STS S3 (Security Token Service)
- AWS CloudFront (CloudFront S3Storage)
- Google Cloud Storage
- Microsoft Azure Blob Storage
- Swift Storage
- Nutanix Object Storage
- IBM Cloud Object Storage
- NetApp ONTAP S3 Object Storage
- Hitachi Content Platform (HCP) Object Storage
Many of the supported storage providers use the RadosGWStorage
driver due to their S3-compatible APIs.
8.3.1. Storage configuration fields Copy linkLink copied to clipboard!
The following table describes the storage configuration fields for Red Hat Quay. These fields are required when configuring backend storage.
Field | Type | Description |
---|---|---|
DISTRIBUTED_STORAGE_CONFIG | Object |
Configuration for storage engine(s) to use in Red Hat Quay. Each key represents an unique identifier for a storage engine. The value consists of a tuple of (key, value) forming an object describing the storage engine parameters. |
DISTRIBUTED_STORAGE_DEFAULT_LOCATIONS | Array of string |
The list of storage engine(s) (by ID in |
DISTRIBUTED_STORAGE_PREFERENCE | Array of string |
The preferred storage engine(s) (by ID in |
MAXIMUM_LAYER_SIZE | String |
Maximum allowed size of an image layer. |
Storage configuration example
DISTRIBUTED_STORAGE_CONFIG: DISTRIBUTED_STORAGE_DEFAULT_LOCATIONS: [] DISTRIBUTED_STORAGE_PREFERENCE: - default MAXIMUM_LAYER_SIZE: 100G
DISTRIBUTED_STORAGE_CONFIG:
DISTRIBUTED_STORAGE_DEFAULT_LOCATIONS: []
DISTRIBUTED_STORAGE_PREFERENCE:
- default
MAXIMUM_LAYER_SIZE: 100G
8.3.2. Local storage Copy linkLink copied to clipboard!
The following YAML shows an example configuration using local storage.
Only use local storage when deploying a registry for proof of concept purposes. It is not intended for production purposes. When using local storage, you must map the registry to a local directory to the datastorage
path in the container when starting the registry. For more information, see Proof of Concept - Deploying Red Hat Quay
Local storage example
8.3.3. Red Hat OpenShift Data Foundation Copy linkLink copied to clipboard!
The following YAML shows a sample configuration using an Red Hat OpenShift Data Foundation:
8.3.4. Ceph Object Gateway (RadosGW) storage example Copy linkLink copied to clipboard!
Red Hat Quay supports using Ceph Object Gateway (RadosGW) as an object storage backend. RadosGW is a component of Red Hat Ceph Storage, which is a storage platform engineered for private architecture. Red Hat Ceph Storage provides an S3-compatible REST API for interacting with Ceph.
RadosGW is an on-premise S3-compatible storage solution. It implements the S3 API and requires the same authentication fields, such as access_key
, secret_key
, and bucket_name
. For more information about Ceph Object Gateway and the S3 API, see Ceph Object Gateway.
The following YAML shows an example configuration using RadosGW.
RadosGW with general s3 access example
- 1
- Used for general s3 access. Note that general s3 access is not strictly limited to Amazon Web Services (AWS) s3, and can be used with RadosGW or other storage services. For an example of general s3 access using the AWS S3 driver, see "AWS S3 storage".
- 2
- Optional. Defines the maximum chunk size in MB for the final copy. Has no effect if
server_side_assembly
is set toFalse
. - 3
- Optional. Whether Red Hat Quay should try and use server side assembly and the final chunked copy instead of client assembly. Defaults to
True
.
8.3.5. Supported AWS storage backends Copy linkLink copied to clipboard!
Red Hat Quay supports multiple Amazon Web Services (AWS) storage backends:
- S3 storage: Standard support for AWS S3 buckets that uses AWS’s native object storage service.
- STS S3 storage: Support for AWS Security Token Service (STS) to assume IAM roles, allowing for more secure S3 operations.
- CloudFront S3 storage: Integrates with AWS CloudFront to enable high-availability distribution of content while still using AWS S3 as the origin.
The following sections provide example YAMLs and additional information about each AWS storage backend.
8.3.5.1. Amazon Web Services S3 storage Copy linkLink copied to clipboard!
Red Hat Quay supports using AWS S3 as an object storage backend. AWS S3 is an object storage service designed for data availability, scalability, security, and performance. The following YAML shows an example configuration using AWS S3.
AWS S3 example
- 1
- The
S3Storage
storage driver should only be used for AWS S3 buckets. Note that this differs from general S3 access, where the RadosGW driver or other storage services can be used. For an example, see "Example B: Using RadosGW with general S3 access". - 2
- The Amazon Web Services region. Defaults to
us-east-1
.
8.3.5.2. Amazon Web Services STS S3 storage Copy linkLink copied to clipboard!
AWS Security Token Service (STS) provides temporary, limited-privilege credentials for accessing AWS resources, improving security by avoiding the need to store long-term access keys. This is useful in environments such as OpenShift Container Platform where credentials can be rotated or managed through IAM roles.
The following YAML shows an example configuration for using AWS STS with Red Hat Quay on OpenShift Container Platform configurations.
AWS STS S3 storage example
8.3.5.3. AWS CloudFront storage Copy linkLink copied to clipboard!
AWS CloudFront is a content delivery network (CDN) service that caches and distributes content closer to users for improved performance and lower latency. Red Hat Quay supports CloudFront through the CloudFrontedS3Storage
driver, which enables secure, signed access to S3 buckets via CloudFront distributions.
Use the following example when configuring AWS CloudFront for your Red Hat Quay deployment.
When configuring AWS Cloudfront storage, the following conditions must be met for proper use with Red Hat Quay:
-
You must set an Origin path that is consistent with Red Hat Quay’s storage path as defined in your
config.yaml
file. Failure to meet this require results in a403
error when pulling an image. For more information, see Origin path. - You must configure a Bucket policy and a Cross-origin resource sharing (CORS) policy.
-
You must set an Origin path that is consistent with Red Hat Quay’s storage path as defined in your
Cloudfront S3 example YAML
Bucket policy example
8.3.6. Google Cloud Storage Copy linkLink copied to clipboard!
Red Hat Quay supports using Google Cloud Storage (GCS) as an object storage backend. When used with Red Hat Quay, it provides a cloud-native solution for storing container images and artifacts.
The following YAML shows a sample configuration using Google Cloud Storage.
Google Cloud Storage example
- 1
- Optional. The time, in seconds, until a timeout exception is thrown when attempting to read from a connection. The default is
60
seconds. Also encompasses the time, in seconds, until a timeout exception is thrown when attempting to make a connection. The default is60
seconds.
8.3.7. Microsoft Azure Blob Storage Copy linkLink copied to clipboard!
Red Hat Quay supports using Microsoft Azure Blob Storage as an object storage backend. Azure Blob Storage can be used to persist container images, metadata, and other artifacts in a secure and cloud-native manner.
The following YAML shows a sample configuration using Azure Storage.
Microsoft Azure Blob Storage example
- 1
- The
endpoint_url
parameter for Azure storage is optional and can be used with Microsoft Azure Government (MAG) endpoints. If left blank, theendpoint_url
will connect to the normal Azure region.As of Red Hat Quay 3.7, you must use the Primary endpoint of your MAG Blob service. Using the Secondary endpoint of your MAG Blob service will result in the following error:
AuthenticationErrorDetail:Cannot find the claimed account when trying to GetProperties for the account whusc8-secondary
.
8.3.8. Swift object storage Copy linkLink copied to clipboard!
Red Hat Quay supports using Red Hat OpenStack Platform (RHOSP) Object Storage service, or Swift, as an object storage backend. Swift offers S3-like functionality with its own API and authentication mechanisms.
The following YAML shows a sample configuration using Swift storage.
Swift object storage example
8.3.9. Nutanix Objects Storage Copy linkLink copied to clipboard!
Red Hat Quay supports Nutanix Objects Storage as an object storage backend. Nutanix Object Storage is suitable for organizations running private cloud infrastructure using Nutanix.
The following YAML shows a sample configuration using Nutanix Object Storage.
Nutanix Objects Storage example
8.3.10. IBM Cloud Object Storage Copy linkLink copied to clipboard!
Red Hat Quay supports IBM Cloud Object Storage as an object storage backend. IBM Cloud Object Storage is suitable for cloud-native applications requiring scalable and secure storage on IBM Cloud.
The following YAML shows a sample configuration using IBM Cloud Object Storage.
IBM Cloud Object Storage
- 1
- Optional. Recommended to be set to
100mb
. - 2
- Optional. Defaults to
5mb
. Do not adjust this field without consulting Red Support, because it can have unintended consequences.
8.3.11. NetApp ONTAP S3 object storage Copy linkLink copied to clipboard!
Red Hat Quay supports using NetApp ONTAP S3 as an object storage backend.
The following YAML shows a sample configuration using NetApp ONTAP S3.
Netapp ONTAP S3 example
8.3.12. Hitachi Content Platform object storage Copy linkLink copied to clipboard!
Red Hat Quay supports using Hitachi Content Platform (HCP) as an object storage backend.
The following YAML shows a sample configuration using HCP for object storage.
HCP storage configuration example
8.4. Redis configuration fields Copy linkLink copied to clipboard!
Redis is used by Red Hat Quay to support backend tasks and services, such as build triggers and notifications. There are configuration types related to Redis: build logs and user events. The following sections detail the configuration fields available for each type.
8.4.1. Build logs Copy linkLink copied to clipboard!
Build logs are generated during the image build process and provide insights for debugging and auditing. Red Hat Quay uses Redis to temporarily store these logs before they are accessed through the user interface or API.
The following build logs configuration fields are available for Redis deployments.
Field | Type | Description |
---|---|---|
BUILDLOGS_REDIS | Object | Redis connection details for build logs caching. |
.host | String |
The hostname at which Redis is accessible. |
.port | Number |
The port at which Redis is accessible. |
.password | String |
The password to connect to the Redis instance. |
.ssl | Boolean | Whether to enable TLS communication between Redis and Quay. Defaults to false. |
Build logs configuration example
8.4.2. User events Copy linkLink copied to clipboard!
User events track activity across Red Hat Quay, such as repository pushes, tag creations, deletions, and permission changes. These events are recorded in Redis as part of the activity stream and can be accessed through the API or web interface.
The following user event fields are available for Redis deployments.
Field | Type | Description |
---|---|---|
USER_EVENTS_REDIS | Object | Redis connection details for user event handling. |
.host | String |
The hostname at which Redis is accessible. |
.port | Number |
The port at which Redis is accessible. |
.password | String |
The password to connect to the Redis instance. |
.ssl | Boolean | Whether to enable TLS communication between Redis and Quay. Defaults to false. |
.ssl_keyfile | String |
The name of the key database file, which houses the client certificate to be used. |
.ssl_certfile | String |
Used for specifying the file path of the SSL certificate. |
.ssl_cert_reqs | String |
Used to specify the level of certificate validation to be performed during the SSL/TLS handshake. |
.ssl_ca_certs | String |
Used to specify the path to a file containing a list of trusted Certificate Authority (CA) certificates. |
.ssl_ca_data | String |
Used to specify a string containing the trusted CA certificates in PEM format. |
.ssl_check_hostname | Boolean |
Used when setting up an SSL/TLS connection to a server. It specifies whether the client should check that the hostname in the server’s SSL/TLS certificate matches the hostname of the server it is connecting to. |
Redis user events example