Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 2. Upgrading the Red Hat Quay Operator Overview
Currently, upgrading the Red Hat Quay Operator is not supported on IBM Power and IBM Z.
The Red Hat Quay Operator follows a synchronized versioning scheme, which means that each version of the Operator is tied to the version of Red Hat Quay and the components that it manages. There is no field on the QuayRegistry custom resource which sets the version of Red Hat Quay to deploy; the Operator can only deploy a single version of all components. This scheme was chosen to ensure that all components work well together and to reduce the complexity of the Operator needing to know how to manage the lifecycles of many different versions of Red Hat Quay on Kubernetes.
2.1. Operator Lifecycle Manager Link kopierenLink in die Zwischenablage kopiert!
The Red Hat Quay Operator should be installed and upgraded using the Operator Lifecycle Manager (OLM). When creating a Subscription with the default approvalStrategy: Automatic, OLM will automatically upgrade the Red Hat Quay Operator whenever a new version becomes available.
When the Red Hat Quay Operator is installed by Operator Lifecycle Manager, it might be configured to support automatic or manual upgrades. This option is shown on the OperatorHub page for the Red Hat Quay Operator during installation. It can also be found in the Red Hat Quay Operator Subscription object by the approvalStrategy field. Choosing Automatic means that your Red Hat Quay Operator will automatically be upgraded whenever a new Operator version is released. If this is not desirable, then the Manual approval strategy should be selected.
2.2. Upgrading the Red Hat Quay Operator Link kopierenLink in die Zwischenablage kopiert!
The standard approach for upgrading installed Operators on OpenShift Container Platform is documented at Upgrading installed Operators.
In general, Red Hat Quay supports upgrades from a prior (N-1) minor version only. For example, upgrading directly from Red Hat Quay 3.0.5 to the latest version of 3.5 is not supported. Instead, users would have to upgrade as follows:
-
3.0.5
3.1.3 -
3.1.3
3.2.2 -
3.2.2
3.3.4 -
3.3.4
3.4.z -
3.4.z
3.5.z
This is required to ensure that any necessary database migrations are done correctly and in the right order during the upgrade.
In some cases, Red Hat Quay supports direct, single-step upgrades from prior (N-2, N-3) minor versions. This simplifies the upgrade procedure for customers on older releases. The following upgrade paths are supported for Red Hat Quay 3.10:
-
3.7.z
3.10.z -
3.8.z
3.10.z -
3.9.z
3.10.z
For users on standalone deployments of Red Hat Quay wanting to upgrade to 3.9, see the Standalone upgrade guide.
2.2.1. Upgrading Red Hat Quay Link kopierenLink in die Zwischenablage kopiert!
To update Red Hat Quay from one minor version to the next, for example, 3.9
For z stream upgrades, for example, 3.9.1 z stream upgrade depends on the approvalStrategy as outlined above. If the approval strategy is set to Automatic, the Red Hat Quay Operator upgrades automatically to the newest z stream. This results in automatic, rolling Red Hat Quay updates to newer z streams with little to no downtime. Otherwise, the update must be manually approved before installation can begin.
2.3. Removing config editor objects on Red Hat Quay Operator Link kopierenLink in die Zwischenablage kopiert!
The config editor has been removed from the Red Hat Quay Operator on OpenShift Container Platform deployments. As a result, the quay-config-editor pod no longer deploys, and users cannot check the status of the config editor route. Additionally, the Config Editor Endpoint no longer generates on the Red Hat Quay Operator Details page.
Users with existing Red Hat Quay Operators who are upgrading from 3.7, 3.8, or 3.9 to 3.10 must manually remove the Red Hat Quay config editor by removing the pod, deployment, route, service, and secret objects.
To remove the deployment, route, service, and secret objects, use the following procedure.
Prerequisites
- You have deployed Red Hat Quay version 3.7, 3.8, or 3.9.
-
You have a valid
QuayRegistryobject.
Procedure
Obtain the
quayregistry-quay-config-editorroute object by entering the following command:oc get route
$ oc get routeCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
--- quayregistry-quay-config-editor-c866f64c4-68gtb 1/1 Running 0 49m ---
--- quayregistry-quay-config-editor-c866f64c4-68gtb 1/1 Running 0 49m ---Copy to Clipboard Copied! Toggle word wrap Toggle overflow Remove the
quayregistry-quay-config-editorroute object by entering the following command:oc delete route quayregistry-quay-config-editor
$ oc delete route quayregistry-quay-config-editorCopy to Clipboard Copied! Toggle word wrap Toggle overflow Obtain the
quayregistry-quay-config-editordeployment object by entering the following command:oc get deployment
$ oc get deploymentCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
--- quayregistry-quay-config-editor ---
--- quayregistry-quay-config-editor ---Copy to Clipboard Copied! Toggle word wrap Toggle overflow Remove the
quayregistry-quay-config-editordeployment object by entering the following command:oc delete deployment quayregistry-quay-config-editor
$ oc delete deployment quayregistry-quay-config-editorCopy to Clipboard Copied! Toggle word wrap Toggle overflow Obtain the
quayregistry-quay-config-editorservice object by entering the following command:oc get svc | grep config-editor
$ oc get svc | grep config-editorCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
quayregistry-quay-config-editor ClusterIP 172.30.219.194 <none> 80/TCP 6h15m
quayregistry-quay-config-editor ClusterIP 172.30.219.194 <none> 80/TCP 6h15mCopy to Clipboard Copied! Toggle word wrap Toggle overflow Remove the
quayregistry-quay-config-editorservice object by entering the following command:oc delete service quayregistry-quay-config-editor
$ oc delete service quayregistry-quay-config-editorCopy to Clipboard Copied! Toggle word wrap Toggle overflow Obtain the
quayregistry-quay-config-editor-credentialssecret by entering the following command:oc get secret | grep config-editor
$ oc get secret | grep config-editorCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
quayregistry-quay-config-editor-credentials-mb8kchfg92 Opaque 2 52m
quayregistry-quay-config-editor-credentials-mb8kchfg92 Opaque 2 52mCopy to Clipboard Copied! Toggle word wrap Toggle overflow Delete the
quayregistry-quay-config-editor-credentialssecret by entering the following command:oc delete secret quayregistry-quay-config-editor-credentials-mb8kchfg92
$ oc delete secret quayregistry-quay-config-editor-credentials-mb8kchfg92Copy to Clipboard Copied! Toggle word wrap Toggle overflow Obtain the
quayregistry-quay-config-editorpod by entering the following command:$ oc get pod
$ $ oc get podCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
--- quayregistry-quay-config-editor-c866f64c4-68gtb 1/1 Running 0 49m ---
--- quayregistry-quay-config-editor-c866f64c4-68gtb 1/1 Running 0 49m ---Copy to Clipboard Copied! Toggle word wrap Toggle overflow Delete the
quayregistry-quay-config-editorpod by entering the following command:oc delete pod quayregistry-quay-config-editor-c866f64c4-68gtb
$ oc delete pod quayregistry-quay-config-editor-c866f64c4-68gtbCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.3.1. Upgrading with custom SSL/TLS certificate/key pairs without Subject Alternative Names Link kopierenLink in die Zwischenablage kopiert!
There is an issue for customers using their own SSL/TLS certificate/key pairs without Subject Alternative Names (SANs) when upgrading from Red Hat Quay 3.3.4 to Red Hat Quay 3.6 directly. During the upgrade to Red Hat Quay 3.6, the deployment is blocked, with the error message from the Red Hat Quay Operator pod logs indicating that the Red Hat Quay SSL/TLS certificate must have SANs.
If possible, you should regenerate your SSL/TLS certificates with the correct hostname in the SANs. A possible workaround involves defining an environment variable in the quay-app, quay-upgrade and quay-config-editor pods after upgrade to enable CommonName matching:
GODEBUG=x509ignoreCN=0
GODEBUG=x509ignoreCN=0
The GODEBUG=x509ignoreCN=0 flag enables the legacy behavior of treating the CommonName field on X.509 certificates as a hostname when no SANs are present. However, this workaround is not recommended, as it will not persist across a redeployment.
2.3.2. Changing the update channel for the Red Hat Quay Operator Link kopierenLink in die Zwischenablage kopiert!
The subscription of an installed Operator specifies an update channel, which is used to track and receive updates for the Operator. To upgrade the Red Hat Quay Operator to start tracking and receiving updates from a newer channel, change the update channel in the Subscription tab for the installed Red Hat Quay Operator. For subscriptions with an Automatic approval strategy, the upgrade begins automatically and can be monitored on the page that lists the Installed Operators.
2.3.3. Manually approving a pending Operator upgrade Link kopierenLink in die Zwischenablage kopiert!
If an installed Operator has the approval strategy in its subscription set to Manual, when new updates are released in its current update channel, the update must be manually approved before installation can begin. If the Red Hat Quay Operator has a pending upgrade, this status will be displayed in the list of Installed Operators. In the Subscription tab for the Red Hat Quay Operator, you can preview the install plan and review the resources that are listed as available for upgrade. If satisfied, click Approve and return to the page that lists Installed Operators to monitor the progress of the upgrade.
The following image shows the Subscription tab in the UI, including the update Channel, the Approval strategy, the Upgrade status and the InstallPlan:
The list of Installed Operators provides a high-level summary of the current Quay installation:
2.4. Upgrading a QuayRegistry resource Link kopierenLink in die Zwischenablage kopiert!
When the Red Hat Quay Operator starts, it immediately looks for any QuayRegistries it can find in the namespace(s) it is configured to watch. When it finds one, the following logic is used:
-
If
status.currentVersionis unset, reconcile as normal. -
If
status.currentVersionequals the Operator version, reconcile as normal. -
If
status.currentVersiondoes not equal the Operator version, check if it can be upgraded. If it can, perform upgrade tasks and set thestatus.currentVersionto the Operator’s version once complete. If it cannot be upgraded, return an error and leave theQuayRegistryand its deployed Kubernetes objects alone.
2.5. Upgrading a QuayEcosystem Link kopierenLink in die Zwischenablage kopiert!
Upgrades are supported from previous versions of the Operator which used the QuayEcosystem API for a limited set of configurations. To ensure that migrations do not happen unexpectedly, a special label needs to be applied to the QuayEcosystem for it to be migrated. A new QuayRegistry will be created for the Operator to manage, but the old QuayEcosystem will remain until manually deleted to ensure that you can roll back and still access Quay in case anything goes wrong. To migrate an existing QuayEcosystem to a new QuayRegistry, use the following procedure.
Procedure
Add
"quay-operator/migrate": "true"to themetadata.labelsof theQuayEcosystem.oc edit quayecosystem <quayecosystemname>
$ oc edit quayecosystem <quayecosystemname>Copy to Clipboard Copied! Toggle word wrap Toggle overflow metadata: labels: quay-operator/migrate: "true"metadata: labels: quay-operator/migrate: "true"Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Wait for a
QuayRegistryto be created with the samemetadata.nameas yourQuayEcosystem. TheQuayEcosystemwill be marked with the label"quay-operator/migration-complete": "true". -
After the
status.registryEndpointof the newQuayRegistryis set, access Red Hat Quay and confirm that all data and settings were migrated successfully. -
If everything works correctly, you can delete the
QuayEcosystemand Kubernetes garbage collection will clean up all old resources.
2.5.1. Reverting QuayEcosystem Upgrade Link kopierenLink in die Zwischenablage kopiert!
If something goes wrong during the automatic upgrade from QuayEcosystem to QuayRegistry, follow these steps to revert back to using the QuayEcosystem:
Procedure
Delete the
QuayRegistryusing either the UI orkubectl:kubectl delete -n <namespace> quayregistry <quayecosystem-name>
$ kubectl delete -n <namespace> quayregistry <quayecosystem-name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
If external access was provided using a
Route, change theRouteto point back to the originalServiceusing the UI orkubectl.
If your QuayEcosystem was managing the PostgreSQL database, the upgrade process will migrate your data to a new PostgreSQL database managed by the upgraded Operator. Your old database will not be changed or removed but Red Hat Quay will no longer use it once the migration is complete. If there are issues during the data migration, the upgrade process will exit and it is recommended that you continue with your database as an unmanaged component.
2.5.2. Supported QuayEcosystem Configurations for Upgrades Link kopierenLink in die Zwischenablage kopiert!
The Red Hat Quay Operator reports errors in its logs and in status.conditions if migrating a QuayEcosystem component fails or is unsupported. All unmanaged components should migrate successfully because no Kubernetes resources need to be adopted and all the necessary values are already provided in Red Hat Quay’s config.yaml file.
Database
Ephemeral database not supported (volumeSize field must be set).
Redis
Nothing special needed.
External Access
Only passthrough Route access is supported for automatic migration. Manual migration required for other methods.
-
LoadBalancerwithout custom hostname: After theQuayEcosystemis marked with label"quay-operator/migration-complete": "true", delete themetadata.ownerReferencesfield from existingServicebefore deleting theQuayEcosystemto prevent Kubernetes from garbage collecting theServiceand removing the load balancer. A newServicewill be created withmetadata.nameformat<QuayEcosystem-name>-quay-app. Edit thespec.selectorof the existingServiceto match thespec.selectorof the newServiceso traffic to the old load balancer endpoint will now be directed to the new pods. You are now responsible for the oldService; the Quay Operator will not manage it. -
LoadBalancer/NodePort/Ingresswith custom hostname: A newServiceof typeLoadBalancerwill be created withmetadata.nameformat<QuayEcosystem-name>-quay-app. Change your DNS settings to point to thestatus.loadBalancerendpoint provided by the newService.
Clair
Nothing special needed.
Object Storage
QuayEcosystem did not have a managed object storage component, so object storage will always be marked as unmanaged. Local storage is not supported.
Repository Mirroring
Nothing special needed.