How quay/quay-operator works
Project type and purpose
• This is a Kubernetes Operator (written in Go using Kubebuilder) for “opinionated deployment” of the Quay container registry on Kubernetes, with support for auxiliary components (Clair, PostgreSQL, Redis, ObjectStorage, HPA, Monitoring, Routes, TLS webhooks, etc.) and delivered via Operator Lifecycle Manager (OLM) bundles.
File structure
• Top-level Go source (main.go, controllers/, apis/, pkg/) ⇒ Operator control loop
• config/ & bundle/ directories ⇒ Kubernetes manifests, CRDs, RBAC, webhook, OLM bundle, subscription
• kustomize/ directory ⇒ overlays & base component YAMLs (Quay, Clair, DB, Redis, HPA, routes, monitoring)
• hack/ scripts ⇒ local dev, build, deploy
• e2e/ ⇒ end-to-end tests driving custom resources
• pkg/kustomize & pkg/cmpstatus ⇒ libraries for generating Kubernetes resources and status evaluation
• pkg/middleware & controllers/quay ⇒ reconciliation logic for the QuayRegistry CRD
README for additional insights
• This operator defines a QuayRegistry CRD (apis/quay/v1/quayregistry_types.go)
• It watches CR instances, then uses the “kustomize” lib to render component manifests and applies them
• It publishes an OLM bundle under bundle/manifests & metadata so users can install via OperatorHub
• It leverages standard Kubernetes patterns: declarative resources, webhooks, RBAC, and OLM integration