Skip to content

Commit a5db254

Browse files
stevsmitSteven Smith
andauthored
Adds Operator configuration information (quay#1342)
Co-authored-by: Steven Smith <[email protected]>
1 parent 705202c commit a5db254

10 files changed

+308
-96
lines changed

config_quay/master.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,22 @@ include::modules/config-intro.adoc[leveloffset=+1]
99
include::modules/config-disclaimer.adoc[leveloffset=+1]
1010
include::modules/understanding-configuration-file.adoc[leveloffset=+1]
1111

12+
//onprem
1213
include::modules/on-prem-configuration-overview.adoc[leveloffset=+1]
1314
include::modules/config-file-minimal.adoc[leveloffset=+2]
1415
include::modules/modifying-config-file-post-deployment.adoc[leveloffset=+2]
1516
include::modules/config-file-verification.adoc[leveloffset=+2]
1617

18+
//operator - cross compare with quay operator docs
19+
include::modules/operator-components-intro.adoc[leveloffset=+1]
20+
include::modules/understanding-quayregistry-cr.adoc[leveloffset=+2]
21+
include::modules/operator-components-managed.adoc[leveloffset=+2]
22+
include::modules/modifying-quayregistry-cr-after-deployment.adoc[leveloffset=+2]
23+
include::modules/modifying-quayregistry-cr-ui.adoc[leveloffset=+3]
24+
include::modules/modifying-quayregistry-cr-cli.adoc[leveloffset=+3]
25+
include::modules/operator-config-bundle-secret.adoc[leveloffset=+3]
26+
include::modules/modifying-config-bundle-secret-ui.adoc[leveloffset=+4]
27+
include::modules/operator-config-cli-download.adoc[leveloffset=+4]
1728

1829
include::modules/config-updates-314.adoc[leveloffset=+2]
1930
//include::modules/config-updates-313.adoc[leveloffset=+2]
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
:_content-type: CONCEPT
2+
[id="modifying-configuration-file-ocp"]
3+
= Modifying the configuration file by using the {ocp} web console
4+
5+
Use the following procedure to modify the `config.yaml` file that is stored by the `configBundleSecret` by using the {ocp} web console.
6+
7+
.Prerequisites
8+
9+
* You are logged in to the {ocp} cluster as a user with admin privileges.
10+
11+
.Procedure
12+
13+
. On the {ocp} web console, click *Operators* -> *Installed Operators* -> *Red Hat Quay*.
14+
15+
. Click *Quay Registry*.
16+
17+
. Click the name of your {productname} registry, for example, *example-registry*.
18+
19+
. On the *QuayRegistry details* page, click the name of your *Config Bundle Secret*, for example, *example-registry-config-bundle*.
20+
21+
. Click *Actions* -> *Edit Secret*.
22+
23+
. In the *Value* box, add the desired key/value pair. For example, to add a superuser to your {productname-ocp} deployment, add the following reference:
24+
+
25+
[source,yaml]
26+
----
27+
SUPER_USERS:
28+
- quayadmin
29+
----
30+
31+
. Click *Save*.
32+
33+
.Verification
34+
35+
. Verify that the changes have been accepted:
36+
37+
.. On the {ocp} web console, click *Operators* -> *Installed Operators* -> *Red Hat Quay*.
38+
39+
.. Click *Quay Registry*.
40+
41+
.. Click the name of your {productname} registry, for example, *example-registry*.
42+
43+
.. Click *Events*. If successful, the following message is displayed:
44+
+
45+
[source,text]
46+
----
47+
All objects created/updated successfully
48+
----
49+
50+
51+
[NOTE]
52+
You must base64 encode any updated config.yaml before placing it in the Secret. Ensure the Secret name matches the value specified in spec.configBundleSecret.
53+
Once the Secret is updated, the Operator detects the change and automatically rolls out updates to the Red Hat Quay pods.
54+
55+
For detailed steps, see "Updating configuration secrets through the {productname} UI."
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:_content-type: CONCEPT
2+
[id="modifying-quayregistry-cr-after-deployment"]
3+
= Modifying the QuayRegistry CR after deployment
4+
5+
After you have installed the {productname} Operator and created an initial deployment, you can modify the `QuayRegistry` custom resource (CR) to customize or reconfigure aspects of the Red Hat Quay environment.
6+
7+
{productname} administrators might modify the QuayRegistry CR for the following reasons:
8+
9+
* *To change component management*: Switch components from `managed: true` to `managed: false` in order to bring your own infrastructure. For example, you might set `kind: objectstorage` to unmanaged to integrate external object storage platforms such as Google Cloud Storage or Nutanix.
10+
11+
* *To apply custom configuration*: Update or replace the `configBundleSecret` to apply new configuration settings, for example, authentication providers, external SSL/TLS settings, feature flags.
12+
13+
* *To enable or disable features*: Toggle features like repository mirroring, Clair scanning, or horizontal pod autoscaling by modifying the `spec.components` list.
14+
15+
* *To scale the deployment*: Adjust environment variables or replica counts for the Quay application.
16+
17+
* *To integrate with external services*: Provide configuration for external PostgreSQL, Redis, or Clair databases, and update endpoints or credentials.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
:_content-type: CONCEPT
2+
[id="modifying-quayregistry-cr-cli"]
3+
= Modifying QuayRegistry components CR by using the CLI
4+
5+
The `QuayRegistry` CR can be modified by using the CLI.
6+
7+
.Prerequisites
8+
9+
* You are logged in to your {ocp} cluster as a user with admin privileges.
10+
11+
.Procedure
12+
13+
. Edit the `QuayRegistry` CR by entering the following command:
14+
+
15+
[source,terminal]
16+
----
17+
$ oc edit quayregistry <registry_name> -n <namespace>
18+
----
19+
20+
. Make the desired changes to the `QuayRegistry` CR.
21+
+
22+
[NOTE]
23+
====
24+
Setting a component to unmanaged (`managed: false`) might require additional configuration. For more information about setting unmanaged components in the `QuayRegistry` CR, see link:https://docs.redhat.com/en/documentation/red_hat_quay/{producty}/html-single/deploying_the_red_hat_quay_operator_on_openshift_container_platform/index#operator-components-unmanaged[Using unmanaged components for dependencies].
25+
====
26+
27+
. Save the changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
:_content-type: CONCEPT
2+
[id="modifying-quayregistry-cr-ocp-console"]
3+
= Modifying QuayRegistry CR components by using the {ocp} web console
4+
5+
The `QuayRegistry` can be modified by using the {ocp} web console.
6+
7+
.Prerequisites
8+
9+
* You are logged into {ocp} as a user with admin privileges.
10+
* You have installed the {productname} Operator.
11+
12+
.Procedure
13+
14+
. On the {ocp} web console, click *Operators* -> *Installed Operators*.
15+
16+
. Click *Red Hat Quay*.
17+
18+
. Click *Quay Registry*.
19+
20+
. Click the name of your {productname} registry, for example, *example-registry*.
21+
22+
. Click *YAML*.
23+
24+
. Adjust the `managed` field of the desired component to either `true` or `false`.
25+
26+
. Click *Save*.
27+
+
28+
[NOTE]
29+
====
30+
Setting a component to unmanaged (`managed: false`) might require additional configuration. For more information about setting unmanaged components in the `QuayRegistry` CR, see link:https://docs.redhat.com/en/documentation/red_hat_quay/{producty}/html-single/deploying_the_red_hat_quay_operator_on_openshift_container_platform/index#operator-components-unmanaged[Using unmanaged components for dependencies].
31+
====
Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,11 @@
11
:_content-type: CONCEPT
22
[id="operator-components-intro"]
3-
= {productname} Operator components
3+
= {productname} Operator configuration overview
44

5-
{productname} has many dependencies. These dependencies include a database, object storage, Redis, and others. The {productname} Operator manages an opinionated deployment of {productname} and its dependencies on Kubernetes. These dependencies are treated as _components_ and are configured through the `QuayRegistry` API.
5+
When deploying {productname} using the Operator on {ocp}, configuration is managed declaratively through the `QuayRegistry` custom resource (CR). This model allows cluster administrators to define the desired state of the {productname} deployment, including which components are enabled, storage backends, SSL/TLS configuration, and other core features.
66

7-
In the `QuayRegistry` custom resource, the `spec.components` field configures components. Each component contains two fields: `kind` (the name of the component), and `managed` (a boolean that addresses whether the component lifecycle is handled by the {productname} Operator).
7+
After deploying {productname-ocp} with the Operator, administrators can further customize their registry by updating the `config.yaml` file and referencing it in a Kubernetes secret. This configuration bundle is linked to the `QuayRegistry` CR through the `configBundleSecret` field.
88

9-
By default, all components are managed and auto-filled upon reconciliation for visibility:
10-
11-
.Example `QuayRegistry` resource
12-
[source,yaml]
13-
----
14-
apiVersion: quay.redhat.com/v1
15-
kind: QuayRegistry
16-
metadata:
17-
name: example-registry
18-
namespace: quay-enterprise
19-
spec:
20-
configBundleSecret: config-bundle-secret
21-
components:
22-
- kind: quay
23-
managed: true
24-
- kind: postgres
25-
managed: true
26-
- kind: clair
27-
managed: true
28-
- kind: redis
29-
managed: true
30-
- kind: horizontalpodautoscaler
31-
managed: true
32-
- kind: objectstorage
33-
managed: true
34-
- kind: route
35-
managed: true
36-
- kind: mirror
37-
managed: true
38-
- kind: monitoring
39-
managed: true
40-
- kind: tls
41-
managed: true
42-
- kind: clairpostgres
43-
managed: true
44-
----
9+
The Operator reconciles the state defined in the `QuayRegistry` CR and its associated configuration, automatically deploying or updating registry components as needed.
4510

11+
This guide covers the basic concepts behind the `QuayRegistry` CR and modifying your `config.yaml` file on {productname-ocp} deployments. More advanced topics, such as using unmanaged components within the `QuayRegistry` CR, can be found in link:https://docs.redhat.com/en/documentation/red_hat_quay/3/html-single/deploying_the_red_hat_quay_operator_on_openshift_container_platform/index[Deploying {productname} Operator on {ocp}].
Lines changed: 61 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,63 @@
11
:_content-type: REFERENCE
22
[id="operator-components-managed"]
3-
= Using managed components
4-
5-
Unless your `QuayRegistry` custom resource specifies otherwise, the {productname} Operator uses defaults for the following managed components:
6-
7-
* **quay:** Holds overrides for deployment of {productname-ocp}, for example, environment variables and number of replicas. This component is new as of {productname} 3.7 and cannot be set to unmanaged.
8-
9-
* **postgres:** For storing the registry metadata,
10-
ifeval::["{productname}" == "Red Hat Quay"]
11-
As of {productname} 3.9, uses a version of PostgreSQL 13 from link:https://www.softwarecollections.org/en/[Software Collections].
12-
+
13-
[NOTE]
14-
====
15-
When upgrading from {productname} 3.8 -> 3.9, the Operator automatically handles upgrading PostgreSQL 10 to PostgreSQL 13. This upgrade is required. PostgreSQL 10 had its final release on November 10, 2022 and is no longer supported.
16-
====
17-
endif::[]
18-
ifeval::["{productname}" == "Project Quay"]
19-
As of {productname} 3.9, uses an upstream (CentOS) version of PostgreSQL 13.
20-
endif::[]
21-
* **clair:** Provides image vulnerability scanning.
22-
23-
* **redis:** Stores live builder logs and the {productname} tutorial. Also includes the locking mechanism that is required for garbage collection.
24-
25-
* **horizontalpodautoscaler:** Adjusts the number of `Quay` pods depending on memory/cpu consumption.
26-
27-
* **objectstorage:** For storing image layer blobs, utilizes the `ObjectBucketClaim` Kubernetes API which is provided by Noobaa or {odf}.
28-
29-
* **route:** Provides an external entrypoint to the {productname} registry from outside of {ocp}.
30-
31-
* **mirror:** Configures repository mirror workers to support optional repository mirroring.
32-
33-
* **monitoring:** Features include a Grafana dashboard, access to individual metrics, and notifications for frequently restarting `Quay` pods.
34-
35-
* **tls:** Configures whether {productname} or {ocp} handles SSL/TLS.
36-
37-
* **clairpostgres:** Configures a managed Clair database. This is a separate database than the PostgreSQL database used to deploy {productname}.
38-
39-
The {productname} Operator handles any required configuration and installation work needed for {productname} to use the managed components. If the opinionated deployment performed by the {productname} Operator is unsuitable for your environment, you can provide the {productname} Operator with `unmanaged` resources, or overrides, as described in the following sections.
3+
= Managed components
4+
5+
By default, the Operator handles all required configuration and installation needed for {productname}'s managed components.
6+
7+
If the opinionated deployment performed by the {productname} Operator is unsuitable for your environment, you can provide the {productname} Operator with `unmanaged` resources, or overrides, as described in link:https://docs.redhat.com/en/documentation/red_hat_quay/{producty}/html-single/deploying_the_red_hat_quay_operator_on_openshift_container_platform/index#operator-components-managed[Using unmanaged components].
8+
9+
.QuayRegistry required fields
10+
[cols="2a,1a,2a",options="header"]
11+
|===
12+
| Field | Type | Description
13+
14+
|`quay` |Boolean | Holds overrides for deployment of {productname-ocp}, such as environment variables and number of replicas. This component cannot be set to unmanaged (`managed: false`).
15+
|`postgres` |Boolean | Used for storing registry metadata. Currently, PostgreSQL version 13 is used.
16+
|`clair` |Boolean | Provides image vulnerability scanning.
17+
|`redis` |Boolean | Storage live builder logs and the locking mechanism that is required for garbage collection.
18+
|`horizontalpodautoscaler` |Boolean | Adjusts the number of `quay` pods depending on your memory and CPU consumption.
19+
|`objectstorage` |Boolean | Stores image layer blobs. When set to `managed: true`, utilizes the `ObjectBucketClaim` Kubernetes API which is provided by NooBaa or {odf}. Setting this field to `managed: false` requires you to provide your own object storage.
20+
|`route` |Boolean | Provides an external entrypoint to the {productname} registry from outside of {ocp}.
21+
|`mirror` |Boolean | Configures repository mirror workers to support optional repository mirroring.
22+
|`monitoring` |Boolean | Features include a Grafana dashboard, access to individual metrics, and notifications for frequently restarting `quay` pods.
23+
|`tls` |Boolean | Configures whether SSL/TLS is automatically handled.
24+
|`clairpostgres` |Boolean | Configures a managed Clair database. This is a separate database than the PostgreSQL database that is used to deploy {productname}.
25+
26+
|===
27+
28+
The following example shows you the default configuration for the `QuayRegistry` custom resource provided by the {productname} Operator. It is available on the {ocp} web console.
29+
30+
.Example `QuayRegistry` custom resource
31+
[source,yaml]
32+
----
33+
apiVersion: quay.redhat.com/v1
34+
kind: QuayRegistry
35+
metadata:
36+
name: <example_registry>
37+
namespace: <namespace>
38+
spec:
39+
configBundleSecret: config-bundle-secret
40+
components:
41+
- kind: quay
42+
managed: true
43+
- kind: postgres
44+
managed: true
45+
- kind: clair
46+
managed: true
47+
- kind: redis
48+
managed: true
49+
- kind: horizontalpodautoscaler
50+
managed: true
51+
- kind: objectstorage
52+
managed: true
53+
- kind: route
54+
managed: true
55+
- kind: mirror
56+
managed: true
57+
- kind: monitoring
58+
managed: true
59+
- kind: tls
60+
managed: true
61+
- kind: clairpostgres
62+
managed: true
63+
----
Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
:_content-type: REFERENCE
22
[id="operator-config-bundle-secret"]
3-
= Config bundle secret
3+
= Understanding the configBundleSecret
44

5-
The `spec.configBundleSecret` field is a reference to the `metadata.name` of a `Secret` in the same namespace as the `QuayRegistry` resource. This `Secret` must contain a `config.yaml` key/value pair.
5+
The `spec.configBundleSecret` field is an optional reference to the name of a Secret in the same namespace as the `QuayRegistry` resource. This Secret must contain a `config.yaml` key/value pair, where the value is a {productname} configuration file.
66

7-
The `config.yaml` file is a {productname} `config.yaml` file. This field is optional, and is auto-filled by the {productname} Operator if not provided. If provided, it serves as the base set of config fields which are later merged with other fields from any managed components to form a final output `Secret`, which is then mounted into the {productname} application pods.
7+
The `configBundleSecret` stores the `config.yaml` file, which defines configuration settings for {productname}, such as:
8+
9+
* Authentication backends (for example, OIDC, LDAP)
10+
* External TLS termination settings
11+
* Repository creation policies
12+
* Feature flags
13+
* Notification settings
14+
15+
{productname} administrators might update this secret to:
16+
17+
* Enable a new authentication method
18+
* Add custom SSL/TLS certificates
19+
* Modify security scanning settings
20+
21+
If this field is omitted, the {productname} Operator automatically generates a configuration secret based on default values and managed component settings. If the field is provided, the contents of the `config.yaml` are used as the base configuration and are merged with values from managed components to form the final configuration, which is mounted into the `quay` application pods.

0 commit comments

Comments
 (0)