quay-registry-setup

by tjungbauer

Helm chartv2.0.22Apache-2.0Verified publisher

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:

RepositoryNameVersion
https://charts.stderr.at/tpl~1.0.31

Maintainers

NameEmailUrl
tjungbauer[email protected]https://blog.stderr.at/

Sources

Source:

Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/quay-registry-setup

Parameters

Verify the possible sub-charts for additional settings:

Values

Generic Settings

KeyTypeDefaultDescription
quay.additionalAnnotationsobject{}Additional annotations merged onto Quay chart resources
quay.additionalLabelsobject{}Additional labels merged onto Quay chart resources (Namespace, QuayRegistry, Jobs, etc.)
quay.config_bundlestringquay-generated-configurationName of the Secret of the Quay configuration. This should be configured by the chart used by GitOps approach.
quay.enabledboolfalseEnable configuration of the Quay Operator. This will setup the Namespace and the Operator isntance.
quay.job_ttlSecondsAfterFinishedint600Seconds to retain finished Quay hook Jobs before Kubernetes deletes them (init, cert inject)
quay.namespace.bindtoNodeobjectN/AWhen 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.rolestring"infra"Role where Quay shall be scheduled @default: N/A
quay.namespace.createboolfalseCreate the Namespace for Quay Enterprise. Should be "true" if it is a new namespace.
quay.namespace.namestringN/AName of the Namespace
quay.namespace.syncwaveint0Syncwave to create the Namespace
quay.public_routestringN/AThe public route that shall be used for the registry. This setting is required to initialize quay.
quay.syncwaveint3Syncwave for the quay CRD

Bucket Configuration

KeyTypeDefaultDescription
quay.bucketClaimobject{"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.enabledboolfalseEnable creation of bucket Claim.
quay.bucketClaim.storageclassstringnilName of the storageclass. A separate StorageClass with BackingStore and BackingClass can be created. @ default -- openshift-storage.noobaa.io
quay.bucketClaim.syncwaveint2Syncwave for bucketclaim creation. This should be done very early, but it depends on ODF.

Quay Components

KeyTypeDefaultDescription
quay.componentsobjectall 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.managedbooltrueLet Operator manage clair
quay.components.clair.overridesobject{"replicas":2}Override the number of replicas (default: 2)
quay.components.clairpostgres.managedstringtrueLet Operator manage PostgresDB of Clair
quay.components.hpa.managedstringtrueLet Operator manage Auto Scaling
quay.components.mirror.managedstringtrueLet Operator manage Mirror instances
quay.components.mirror.overridesobject{"replicas":2}Override the number of replicas (default: 2)
quay.components.monitoring.managedstringtrueLet Operator manage Monitoring configuration
quay.components.objectstore.managedstringtrueLet Operator manage Objectstorage
quay.components.postgres.managedbooltrueLet Operator manage Quay Postgres database
quay.components.quay.managedstringtrueLet Operator manage the Quay Application
quay.components.quay.overridesobject{"replicas":2}Override the number of replicas (default: 2)
quay.components.redis.managedstringtrueLet Operator manage Redis
quay.components.route.managedstringtrueLet Operator manage Route creation
quay.components.tls.managedstringtrueLet Operator manage Certificates

Job Initialize Quay

KeyTypeDefaultDescription
quay.init_userobject{"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.enabledboolfalseEnable user account initialization.
quay.init_user.mailstring"[email protected]"Email Address for that username @default [email protected]
quay.init_user.passwordstringgenerated randomlyOPTIONAL: 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.secretNamestringinit-userName of the Secret for the initialize user.
quay.init_user.usernamestringadminDefault Username
quay.job_init_quayobject{"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.enabledboolfalseEnable the init-Job
quay.job_init_quay.quay_basenamestringquay-registry-quay-appBase 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.serviceAccountstringquay-initiatorName of the ServiceAccount
quay.job_init_quay.sleeptimerint30Used to define the sleeptimer.
quay.job_init_quay.syncwaveint200Syncwave for the init Job that generates the admin account.

Job Inject Certificate into Quay Configuration

KeyTypeDefaultDescription
quay.job_inject_route_certobject{"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_caobject{"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.configmapstringnoneName of the configmap that has the additional certificates
quay.job_inject_route_cert.additional_ca.configmap_keystringNoneName of the key inside the Configmap that holds the additional certificates. Be aware of escaping!
quay.job_inject_route_cert.additional_ca.enabledboolfalseEnable additional certificate injection
quay.job_inject_route_cert.certificateobject{"enabled":false,"name":"certificate-name"}Name of the certificate secret that shall be injected.
quay.job_inject_route_cert.certificate.enabledboolfalseEnable Certificate injection
quay.job_inject_route_cert.certificate.namestringNoneName of the secret that contains the certificate. It must contain tls.crt and tls.key.
quay.job_inject_route_cert.enabledboolfalseEnable certificate inject Job
quay.job_inject_route_cert.namestringinject-certificateName of the Job
quay.job_inject_route_cert.serviceAccountstringquay-ca-injectorName of the ServiceAccount for the injector Job
quay.job_inject_route_cert.sleeptimerint30Sleeptime to wait before the certificate is ready
quay.job_inject_route_cert.syncwaveint5Synvwave for this Job

Action Log Configuration

KeyTypeDefaultDescription
quay_configuration.action_log_archive_locationstringN/AIf action log archiving is enabled, the storage engine in which to place the archived data. Example: s3_us_east
quay_configuration.action_log_archive_pathstringN/AIf action log archiving is enabled, the path in storage in which to place the archived data. Example: archives/actionlogs
quay_configuration.action_log_audit_loginsbooltrueWhen 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_thresholdstring30dThe time interval after which to rotate logs. Example: 30d
quay_configuration.logs_modelstringdatabaseSpecifies the preferred method for handling log data. Values: One of database, transition_reads_both_writes_es, elasticsearch, splunk
quay_configuration.logs_model_config.elasticsearch_configobject{"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_regionstring''Amazon web service region.
quay_configuration.logs_model_config.elasticsearch_config.enabledboolfalseEnable Elasticsearch Log configuration
quay_configuration.logs_model_config.elasticsearch_config.index_prefixstring''Elasticsearch’s index prefix.
quay_configuration.logs_model_config.elasticsearch_config.index_settingsstring''Elasticsearch’s index settings
quay_configuration.logs_model_config.elasticsearch_config.log_model_authstringN/ATo authenticate at Elasticsearch a Secret with the keys ACCESS_KEY and SECRET_KEY must be created
quay_configuration.logs_model_config.elasticsearch_config.portstring''Elasticsearch cluster endpoint port.
quay_configuration.logs_model_config.elasticsearch_config.use_sslbooltrueUse ssl for Elasticsearch.
quay_configuration.logs_model_config.kafka_configobject{"bootstrap_servers":[],"enabled":false,"max_block_seconds":"","topic":""}Kafka cluster configuration
quay_configuration.logs_model_config.kafka_config.bootstrap_serverslist[]List of Kafka brokers to bootstrap the client from.
quay_configuration.logs_model_config.kafka_config.enabledboolfalseEnable 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartquay-registry-setup is pinned at v2.0.22 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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