4.2. Modifying your configuration file after deployment
After deploying a Red Hat Quay registry with an initial config.yaml file, Red Hat Quay administrators can update the configuration file to enable or disable features as needed. This flexibility allows administrators to tailor the registry to fit their specific environment needs, or to meet certain security policies.
Because the config.yaml file is not dynamically reloaded, you must restart the Red Hat Quay container after making changes for them to take effect.
The following procedure shows you how to retrieve the config.yaml file from the quay-registry container, how to enable a new feature by adding that feature’s configuration field to the file, and how to restart the quay-registry container using Podman.
Prerequisites
- You have deployed Red Hat Quay.
- You are a registry administrator.
Procedure
If you have access to the
config.yamlfile:Navigate to the directory that is storing the
config.yamlfile. For example:$ cd /home/<username>/<quay-deployment-directory>/configMake changes to the
config.yamlfile by adding a new feature flag. The following example enables the v2 UI:# ... FEATURE_UI_V2: true # ...-
Save the changes made to the
config.yamlfile. Restart the
quay-registrypod by entering the following command:$ podman restart <container_id>
If you do not have access to the
config.yamlfile and need to create a new file while keeping the same credentials:Retrieve the container ID of your
quay-registrypod by entering the following command:$ podman psExample output
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 5f2297ef53ff registry.redhat.io/rhel8/postgresql-13:1-109 run-postgresql 20 hours ago Up 20 hours 0.0.0.0:5432->5432/tcp postgresql-quay 3b40fb83bead registry.redhat.io/rhel8/redis-5:1 run-redis 20 hours ago Up 20 hours 0.0.0.0:6379->6379/tcp redis 0b4b8fbfca6d registry-proxy.engineering.redhat.com/rh-osbs/quay-quay-rhel8:v3.14.0-14 registry 20 hours ago Up 20 hours 0.0.0.0:80->8080/tcp, 0.0.0.0:443->8443/tcp, 7443/tcp, 9091/tcp, 55443/tcp quayCopy the
config.yamlfile from thequay-registrypod to a directory by entering the following command:$ podman cp <container_id>:/quay-registry/conf/stack/config.yaml ./config.yamlMake changes to the
config.yamlfile by adding a new feature flag. The following example sets theAUTHENTICATION_TYPEtoLDAP# ... AUTHENTICATION_TYPE: LDAP # ...Re-deploy the registry, mounting the
config.yamlfile into thequay-registryconfiguration volume by entering the following command:$ sudo podman run -d --rm -p 80:8080 -p 443:8443 \ --name=quay \ -v /home/<username>/<quay-deployment-directory>/config:/conf/stack:Z \ registry.redhat.io/quay/quay-rhel8:v3.14.0