quay-registry-setup
by tjungbauer
Deploy and configure Red Hat Quay Registry.
About this chart
quay-registry-setup
Description
Deploy and configure Red Hat Quay Registry.
This Chart is used to configure the Quay Enterprise registry on a cluster. While the Chart can be used standalone, it should actually be called using a full GitOps approach defined at Quay Setup which will take care of the Operator deployment and bucket configuration.
In addition to deploying and configuring the Operator, the Chart also starts some Kubernetes Jobs:
- init-user: to configure the initial administrator.
- generate-config: to generate a quay configuration.
NOTE: The possibilities to configure Quay seem to be endless. The most common settings are already supported by this Chart. If you need more configuration options, please open an issue.
Per default, the Chart assumes that OpenShift Data Foundation is used as an object storage. Therefore, it tries to create a BucketClaim. To prepare the bucket configuration a sub-chart helper-objectstore can be used. Verify the wrapper chart at Quay Setup for a full picture.
Dependencies
This chart has the following dependencies:
| Repository | Name | Version |
|---|---|---|
| https://charts.stderr.at/ | tpl | ~1.0.31 |
Maintainers
| Name | Url | |
|---|---|---|
| tjungbauer | [email protected] | https://blog.stderr.at/ |
Sources
Source:
- https://github.com/tjungbauer/helm-charts
- https://charts.stderr.at/
- https://github.com/tjungbauer/openshift-clusterconfig-gitops
Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/quay-registry-setup
Parameters
Verify the possible sub-charts for additional settings:
- helper-objectstore: Preparing Object Storage.
- helper-operator: Install the Operator itself.
- helper-status-checker: Check the status of the Operator.
Values
Generic Settings
| Key | Type | Default | Description |
|---|---|---|---|
| quay.additionalAnnotations | object | {} | Additional annotations merged onto Quay chart resources |
| quay.additionalLabels | object | {} | Additional labels merged onto Quay chart resources (Namespace, QuayRegistry, Jobs, etc.) |
| quay.config_bundle | string | quay-generated-configuration | Name of the Secret of the Quay configuration. This should be configured by the chart used by GitOps approach. |
| quay.enabled | bool | false | Enable configuration of the Quay Operator. This will setup the Namespace and the Operator isntance. |
| quay.job_ttlSecondsAfterFinished | int | 600 | Seconds to retain finished Quay hook Jobs before Kubernetes deletes them (init, cert inject) |
| quay.namespace.bindtoNode | object | N/A | When you want to schedule Quay on a specific node (role), for example infrastructure nodes, you can define the role here. Technically, it will add specific annotations onto the Namespace object. |
| quay.namespace.bindtoNode.role | string | "infra" | Role where Quay shall be scheduled @default: N/A |
| quay.namespace.create | bool | false | Create the Namespace for Quay Enterprise. Should be "true" if it is a new namespace. |
| quay.namespace.name | string | N/A | Name of the Namespace |
| quay.namespace.syncwave | int | 0 | Syncwave to create the Namespace |
| quay.public_route | string | N/A | The public route that shall be used for the registry. This setting is required to initialize quay. |
| quay.syncwave | int | 3 | Syncwave for the quay CRD |
Bucket Configuration
| Key | Type | Default | Description |
|---|---|---|---|
| quay.bucketClaim | object | {"enabled":false,"name":"quay-bucketname","storageclass":null,"syncwave":2} | Create a BucketClaim. To use this the ObjectBucketClaim resource must be available on the cluster. If this resource is not available, then a bucket must be created in a different way (prepared before Quay is deployed.) This usually goes together with helper-objectstore, that can create a new BucketClass. |
| quay.bucketClaim.enabled | bool | false | Enable creation of bucket Claim. |
| quay.bucketClaim.storageclass | string | nil | Name of the storageclass. A separate StorageClass with BackingStore and BackingClass can be created. @ default -- openshift-storage.noobaa.io |
| quay.bucketClaim.syncwave | int | 2 | Syncwave for bucketclaim creation. This should be done very early, but it depends on ODF. |
Quay Components
| Key | Type | Default | Description |
|---|---|---|---|
| quay.components | object | all components are installed in managed mode. Where possible multiple replicas (2) will be used. | Quay comes with several components that might be managed by the Operator or managed by the customer. Some might have an "overrides" settings that can manage the number of replicas. This is useful for for testing purposes. |
| quay.components.clair.managed | bool | true | Let Operator manage clair |
| quay.components.clair.overrides | object | {"replicas":2} | Override the number of replicas (default: 2) |
| quay.components.clairpostgres.managed | string | true | Let Operator manage PostgresDB of Clair |
| quay.components.hpa.managed | string | true | Let Operator manage Auto Scaling |
| quay.components.mirror.managed | string | true | Let Operator manage Mirror instances |
| quay.components.mirror.overrides | object | {"replicas":2} | Override the number of replicas (default: 2) |
| quay.components.monitoring.managed | string | true | Let Operator manage Monitoring configuration |
| quay.components.objectstore.managed | string | true | Let Operator manage Objectstorage |
| quay.components.postgres.managed | bool | true | Let Operator manage Quay Postgres database |
| quay.components.quay.managed | string | true | Let Operator manage the Quay Application |
| quay.components.quay.overrides | object | {"replicas":2} | Override the number of replicas (default: 2) |
| quay.components.redis.managed | string | true | Let Operator manage Redis |
| quay.components.route.managed | string | true | Let Operator manage Route creation |
| quay.components.tls.managed | string | true | Let Operator manage Certificates |
Job Initialize Quay
| Key | Type | Default | Description |
|---|---|---|---|
| quay.init_user | object | {"enabled":false,"mail":"[email protected]","password":"","secretName":"initial-user","username":"admin"} | Creating initial admin account. The password for this user can be GENERATED or set in the values file (not recommended) and can be found in the secret. Defaults for username and mail: - username: admin - mail: [email protected] |
| quay.init_user.enabled | bool | false | Enable user account initialization. |
| quay.init_user.mail | string | "[email protected]" | Email Address for that username @default [email protected] |
| quay.init_user.password | string | generated randomly | OPTIONAL: Password in CLEARTEXT. If set then this is used as password. (not recommended) If not set, then a password will be randomly generated. |
| quay.init_user.secretName | string | init-user | Name of the Secret for the initialize user. |
| quay.init_user.username | string | admin | Default Username |
| quay.job_init_quay | object | {"enabled":false,"quay_basename":"quay-registry-quay-app","serviceAccount":"quay-initiator","sleeptimer":30,"syncwave":200} | Initialize Quay and configure the first user. This was start a Job, that will connect to the public route and configure the first (admin) user. |
| quay.job_init_quay.enabled | bool | false | Enable the init-Job |
| quay.job_init_quay.quay_basename | string | quay-registry-quay-app | Base name of quay URL. This is the internal service URL that is used to verify if Quay is up and running. |
| quay.job_init_quay.serviceAccount | string | quay-initiator | Name of the ServiceAccount |
| quay.job_init_quay.sleeptimer | int | 30 | Used to define the sleeptimer. |
| quay.job_init_quay.syncwave | int | 200 | Syncwave for the init Job that generates the admin account. |
Job Inject Certificate into Quay Configuration
| Key | Type | Default | Description |
|---|---|---|---|
| quay.job_inject_route_cert | object | {"additional_ca":{"configmap":"kube-root-ca.crt","configmap_key":".data.ca\\.crt","enabled":false},"certificate":{"enabled":false,"name":"certificate-name"},"enabled":false,"name":"inject-certificate","serviceAccount":"quay-ca-injector","sleeptimer":30,"syncwave":5} | Inject the route certificate into the generated configuration Secret |
| quay.job_inject_route_cert.additional_ca | object | {"configmap":"kube-root-ca.crt","configmap_key":".data.ca\\.crt","enabled":false} | Name of additional certificates to trust that shall be injected. |
| quay.job_inject_route_cert.additional_ca.configmap | string | none | Name of the configmap that has the additional certificates |
| quay.job_inject_route_cert.additional_ca.configmap_key | string | None | Name of the key inside the Configmap that holds the additional certificates. Be aware of escaping! |
| quay.job_inject_route_cert.additional_ca.enabled | bool | false | Enable additional certificate injection |
| quay.job_inject_route_cert.certificate | object | {"enabled":false,"name":"certificate-name"} | Name of the certificate secret that shall be injected. |
| quay.job_inject_route_cert.certificate.enabled | bool | false | Enable Certificate injection |
| quay.job_inject_route_cert.certificate.name | string | None | Name of the secret that contains the certificate. It must contain tls.crt and tls.key. |
| quay.job_inject_route_cert.enabled | bool | false | Enable certificate inject Job |
| quay.job_inject_route_cert.name | string | inject-certificate | Name of the Job |
| quay.job_inject_route_cert.serviceAccount | string | quay-ca-injector | Name of the ServiceAccount for the injector Job |
| quay.job_inject_route_cert.sleeptimer | int | 30 | Sleeptime to wait before the certificate is ready |
| quay.job_inject_route_cert.syncwave | int | 5 | Synvwave for this Job |
Action Log Configuration
| Key | Type | Default | Description |
|---|---|---|---|
| quay_configuration.action_log_archive_location | string | N/A | If action log archiving is enabled, the storage engine in which to place the archived data. Example: s3_us_east |
| quay_configuration.action_log_archive_path | string | N/A | If action log archiving is enabled, the path in storage in which to place the archived data. Example: archives/actionlogs |
| quay_configuration.action_log_audit_logins | bool | true | When set to True, tracks advanced events such as logging into, and out of, the UI, and logging in using Docker for regular users, robot accounts, and for application-specific token accounts. |
| quay_configuration.action_log_rotation_threshold | string | 30d | The time interval after which to rotate logs. Example: 30d |
| quay_configuration.logs_model | string | database | Specifies the preferred method for handling log data. Values: One of database, transition_reads_both_writes_es, elasticsearch, splunk |
| quay_configuration.logs_model_config.elasticsearch_config | object | {"aws_region":"","enabled":false,"host":"","index_prefix":"","index_settings":"","log_model_auth":"log_model_auth","port":"","use_ssl":true} | Elasticsearch cluster configuration |
| quay_configuration.logs_model_config.elasticsearch_config.aws_region | string | '' | Amazon web service region. |
| quay_configuration.logs_model_config.elasticsearch_config.enabled | bool | false | Enable Elasticsearch Log configuration |
| quay_configuration.logs_model_config.elasticsearch_config.index_prefix | string | '' | Elasticsearch’s index prefix. |
| quay_configuration.logs_model_config.elasticsearch_config.index_settings | string | '' | Elasticsearch’s index settings |
| quay_configuration.logs_model_config.elasticsearch_config.log_model_auth | string | N/A | To authenticate at Elasticsearch a Secret with the keys ACCESS_KEY and SECRET_KEY must be created |
| quay_configuration.logs_model_config.elasticsearch_config.port | string | '' | Elasticsearch cluster endpoint port. |
| quay_configuration.logs_model_config.elasticsearch_config.use_ssl | bool | true | Use ssl for Elasticsearch. |
| quay_configuration.logs_model_config.kafka_config | object | {"bootstrap_servers":[],"enabled":false,"max_block_seconds":"","topic":""} | Kafka cluster configuration |
| quay_configuration.logs_model_config.kafka_config.bootstrap_servers | list | [] | List of Kafka brokers to bootstrap the client from. |
| quay_configuration.logs_model_config.kafka_config.enabled | bool | false | Enable Kafka onfiguration |
| quay_ |
Deploy quay-registry-setup with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has quay-registry-setup on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartquay-registry-setup is pinned at v2.0.22 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply