Este contenido no está disponible en el idioma seleccionado.
Chapter 5. Configuring Quay on OpenShift
Once deployed, you can configure the Quay application by editing the Quay configuration bundle secret spec.configBundleSecret and you can also change the managed status of components in the spec.components object of the QuayRegistry resource
Alternatively, you can use the config editor UI to configure the Quay application, as described in the section Chapter 6, Using the config tool to reconfigure Quay on OpenShift.
5.1. Editing the config bundle secret in the OpenShift console Copiar enlaceEnlace copiado en el portapapeles!
Procedure
On the Quay Registry overview screen, click the link for the Config Bundle Secret:
To edit the secret, click Actions
Edit Secret
Modify the configuration and save the changes
- Monitor the deployment to ensure successful completion and that the configuration changes have taken effect
5.2. Determining QuayRegistry endpoints and secrets Copiar enlaceEnlace copiado en el portapapeles!
You can examine the QuayRegistry resource, using oc describe quayregistry or oc get quayregistry -o yaml, to determine the current endpoints and secrets:
The relevant fields are:
-
registryEndpoint: The URL for your registry, for browser access to the registry UI, and for the registry API endpoint -
configBundleSecret: The config bundle secret, containing theconfig.yamlfile and any SSL certs -
configEditorEndpoint: The URL for the config editor tool, for browser access to the config tool, and for the configuration API -
configEditorCredentialsSecret: The secret containing the username (typicallyquayconfig) and the password for the config editor tool
To determine the username and password for the config editor tool:
Retrieve the secret:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Decode the username:
echo 'cXVheWNvbmZpZw==' | base64 --decode
$ echo 'cXVheWNvbmZpZw==' | base64 --decode quayconfigCopy to Clipboard Copied! Toggle word wrap Toggle overflow Decode the password:
echo 'SkZwQkVKTUN0a1BUZmp4dA==' | base64 --decode
$ echo 'SkZwQkVKTUN0a1BUZmp4dA==' | base64 --decode JFpBEJMCtkPTfjxtCopy to Clipboard Copied! Toggle word wrap Toggle overflow
5.3. Downloading the existing configuration Copiar enlaceEnlace copiado en el portapapeles!
There are a number of methods for accessing the current configuration:
Using the config editor endpoint, specifying the username and password for the config editor:
curl -k -u quayconfig:JFpBEJMCtkPTfjxt https://example-registry-quay-config-editor-quay-enterprise.apps.docs.quayteam.org/api/v1/config
$ curl -k -u quayconfig:JFpBEJMCtkPTfjxt https://example-registry-quay-config-editor-quay-enterprise.apps.docs.quayteam.org/api/v1/configCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow Using the config bundle secret
Get the secret data:
oc get secret -n quay-enterprise init-config-bundle-secret -o jsonpath='{.data}'$ oc get secret -n quay-enterprise init-config-bundle-secret -o jsonpath='{.data}'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Sample output
{ "config.yaml": "RkVBVFVSRV9VU0 ... MDAwMAo=" }{ "config.yaml": "RkVBVFVSRV9VU0 ... MDAwMAo=" }Copy to Clipboard Copied! Toggle word wrap Toggle overflow Decode the data:
echo 'RkVBVFVSRV9VU0 ... MDAwMAo=' | base64 --decode
$ echo 'RkVBVFVSRV9VU0 ... MDAwMAo=' | base64 --decodeCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.4. Using the config bundle to configure custom SSL certs Copiar enlaceEnlace copiado en el portapapeles!
You can configure custom SSL certs either before initial deployment or after Red Hat Quay is deployed on OpenShift, by creating or updating the config bundle secret. If you are adding the cert(s) to an existing deployment, you must include the existing config.yaml in the new config bundle secret, even if you are not making any configuration changes.
5.4.1. Set TLS to unmanaged Copiar enlaceEnlace copiado en el portapapeles!
In your Quay Registry yaml, set kind: tls to managed: false:
- kind: tls
managed: false
- kind: tls
managed: false
In the events, you should see that the change is blocked until you set up the appropriate config:
5.4.2. Add certs to config bundle Copiar enlaceEnlace copiado en el portapapeles!
Procedure
Create the secret using embedded data or using files:
Embed the configuration details directly in the Secret resource YAML file, for example:
custom-ssl-config-bundle.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Next, create the secret from the YAML file:
oc create -f custom-ssl-config-bundle.yaml
$ oc create -f custom-ssl-config-bundle.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, you can create files containing the desired information, and then create the secret from those files:
oc create secret generic custom-ssl-config-bundle-secret \ --from-file=config.yaml \ --from-file=extra_ca_cert_my-custom-ssl.crt=my-custom-ssl.crt
$ oc create secret generic custom-ssl-config-bundle-secret \ --from-file=config.yaml \ --from-file=extra_ca_cert_my-custom-ssl.crt=my-custom-ssl.crtCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Create or update the QuayRegistry YAML file
quayregistry.yaml, referencing the created Secret, for example:quayregistry.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Deploy or update the registry using the YAML file:
oc apply -f quayregistry.yaml
oc apply -f quayregistry.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow