You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/proc_deploy-quay-openshift-operator-tng.adoc
+24-10Lines changed: 24 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -133,7 +133,7 @@ If any of these considerations are unacceptable for your environment, it would b
133
133
134
134
==== Using Existing (Un-Managed) Components With the Quay Operator
135
135
136
-
If you have an existing components such as Postgres, Redis or object storage that you would like to use with Quay, you first configure then within the Quay configuration bundle (`config.yaml`) and then reference the bundle in your `QuayRegistry` (as a Kubernetes `secret`) while indicating which Components are unmanaged.
136
+
If you have existing components such as Postgres, Redis or object storage that you would like to use with Quay, you first configure them within the Quay configuration bundle (`config.yaml`) and then reference the bundle in your `QuayRegistry` (as a Kubernetes `Secret`) while indicating which components are unmanaged.
137
137
138
138
For example, to use an existing Postgres database:
139
139
@@ -232,13 +232,13 @@ metadata:
232
232
233
233
. Create the `QuayRegistry` in your namespace:
234
234
235
-
```
235
+
```sh
236
236
$ oc create -n <your-namespace> -f quay.yaml
237
237
```
238
238
239
239
. Wait until the `status.registryEndpoint` is populated.
240
240
241
-
```
241
+
```sh
242
242
$ oc get -n <your-namespace> quayregistry my-registry -o jsonpath="{.status.registryEndpoint}" -w
243
243
```
244
244
@@ -269,7 +269,9 @@ When the Quay Operator starts up, it immediately looks for any `QuayRegistries`
269
269
270
270
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`, follow these steps:
271
271
272
-
. If using an Operator-managed database, ensure that the password is set for the `postgres` root admin user (not set by default). This allows remote access to the database for migration. The Operator looks for this password in the `Secret` referenced by `spec.quay.database.credentialsSecretKey` under the `database-root-password` key.
272
+
==== Preparing Managed Database for Migration
273
+
274
+
If using an external database not deployed by the Quay Operator, skip this step. Otherwise, ensure that the password is set for the `postgres` root admin user (not set by default). This allows remote access to the database for migration. The Operator looks for this password in the `Secret` referenced by `spec.quay.database.credentialsSecretKey` under the `database-root-password` key.
273
275
274
276
To set/change the password, use either the OpenShift console or `kubectl` to [open an SSH terminal connection](https://kubernetes.io/docs/tasks/debug-application-cluster/get-shell-running-container/) to the Postgres pod:
275
277
```sh
@@ -285,9 +287,11 @@ Type "help" for help.
285
287
postgres=# \password
286
288
```
287
289
290
+
==== Performing QuayEcosystem Upgrade
291
+
288
292
. Add `"quay-operator/migrate": "true"` to the `metadata.labels` of the `QuayEcosystem`.
289
293
290
-
. Wait for a `QuayRegistry` to be created with the same `metadata.name` as your `QuayEcosystem`.
294
+
. Wait for a `QuayRegistry` to be created with the same `metadata.name` as your `QuayEcosystem`. The `QuayEcosystem` will be marked with the label `"quay-operator/migration-complete": "true"`.
291
295
292
296
. Once the `status.registryEndpoint` of the new `QuayRegistry` is set, access Quay and confirm all data and settings were migrated successfully.
293
297
@@ -297,40 +301,50 @@ postgres=# \password
297
301
298
302
If something goes wrong during the automatic upgrade from `QuayEcosystem` to `QuayRegistry`, follow these steps to revert back to using the `QuayEcosystem`:
299
303
300
-
. Delete the `QuayRegistry` using either the UI or `kubectl`:
304
+
* Delete the `QuayRegistry` using either the UI or `kubectl`:
. If external access was provided using a `Route`, change the `Route` to point back to the original `Service` using the UI or `kubectl`.
309
+
* If external access was provided using a `Route`, change the `Route` to point back to the original `Service` using the UI or `kubectl`.
306
310
307
311
[NOTE]
308
312
====
309
-
If your `QuayEcosystem` was managing the {productname} Postgres database, the upgrade process will migrate your data to a new Postgres database managed by the upgraded Operator. Your old database will not be changed or removed but Quay will no longer use it once the migration is completed. 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.
313
+
If your `QuayEcosystem` was managing the Postgres database, the upgrade process will migrate your data to a new Postgres database managed by the upgraded Operator. Your old database will not be changed or removed but Quay will no longer use it once the migration is completed. 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.
310
314
====
311
315
312
316
==== Supported QuayEcosystem Configurations for Upgrades
313
317
314
318
The Quay Operator will report 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 Quay's `config.yaml`.
315
319
316
320
*Database*
321
+
317
322
Ephemeral database not supported (`volumeSize` field must be set). The `postgres` user must have a password set and referenced in `credentialsSecretName` (instructions above).
318
323
319
324
*Redis*
325
+
320
326
Nothing special needed.
321
327
322
328
*External Access*
323
-
Only `Route` access supported.
324
329
325
-
If using `LoadBalancer` (which the Operator will mark as an unmanaged component), ensure that you delete the `metadata.ownerReferences` field from existing `Service` _before_ deleting the `QuayEcosystem` to prevent Kubernetes from garbage collecting the `Service` and removing the load balancer. This can be achieved using the OpenShift UI or CLI.
330
+
Only `Route` access supported for automatic migration. Manual migration required for other methods.
331
+
332
+
* `LoadBalancer` without custom hostname:
333
+
After the `QuayEcosystem` is marked with label `"quay-operator/migration-complete": "true"`, delete the `metadata.ownerReferences` field from existing `Service` _before_ deleting the `QuayEcosystem` to prevent Kubernetes from garbage collecting the `Service` and removing the load balancer. A new `Service` will be created with `metadata.name` format `<QuayEcosystem-name>-quay-app`. Edit the `spec.selector` of the existing `Service` to match the `spec.selector` of the new `Service` so traffic to the old load balancer endpoint will now be directed to the new pods. You are now responsible for the old `Service`; the Quay Operator will not manage it.
334
+
335
+
* `LoadBalancer`/`NodePort`/`Ingress` with custom hostname:
336
+
A new `Service` of type `LoadBalancer` will be created with `metadata.name` format `<QuayEcosystem-name>-quay-app`. Change your DNS settings to point to the `status.loadBalancer` endpoint provided by the new `Service`.
326
337
327
338
*Clair*
339
+
328
340
Nothing special needed.
329
341
330
342
*Object Storage*
343
+
331
344
`QuayEcosystem` did not have a managed object storage component, so object storage will always be marked as unmanaged. Local storage is not supported.
0 commit comments