How openshift/cluster-image-registry-operator works
The Image Registry Operator creates and reconciles the cluster’s singleton registry configuration and workload. Its main workflow is to start the operator, bootstrap or read the registry configuration, select storage, and reconcile Kubernetes resources; it also manages the image pruner and auxiliary cloud-specific behavior. README-documented configuration, certificates, routes, status, and storage capabilities are represented. Some subsystem links rely on README statements or source-index references because their implementation excerpts were not provided.
Main entry points: controller.go Registry controller · storage.go Storage selection · main.go Operator entrypoint · generator.go Workload resources
Components 26
Operator runtime
- Operator entrypoint
cmd/cluster-image-registry-operator/main.go - Operator runner
pkg/operator/starter.go - Metrics server
pkg/metrics/server.go
Registry reconciliation
- Registry config
- Registry controller
pkg/operator/controller.go - Config bootstrap
pkg/operator/bootstrap.go - Workload resources
pkg/resource/generator.go - Registry service
pkg/resource/service.go - Service CA
pkg/resource/serviceca.go - Registry certificates
pkg/operator/imageregistrycertificates.go - Operator status
pkg/operator/status.go
Storage backends
- Storage selection
pkg/storage/storage.go - S3 storage
pkg/storage/s3/s3.go - Azure storage
pkg/storage/azure/azure.go - GCS storage
pkg/storage/gcs/gcs.go - IBM COS storage
pkg/storage/ibmcos/ibmcos.go - Swift storage
pkg/storage/swift/swift.go - PVC storage
pkg/storage/pvc/pvc.go - EmptyDir storage
pkg/storage/emptydir/emptydir.go
Auxiliary controllers
- Image pruner
pkg/operator/controllerimagepruner.go - Pruner resources
pkg/resource/generatorimagepruner.go - AWS tag controller
pkg/operator/awstagcontroller.go - Azure path fix
pkg/operator/azurepathfixcontroller.go
Other components
- Cluster configuration
- Registry deployment
- Routes
Connections 27
- Cluster configuration → Operator entrypoint: starts
- Operator entrypoint → Operator runner: runs
cmd/cluster-image-registry-operator/main.go - Operator entrypoint → Metrics server: starts
cmd/cluster-image-registry-operator/main.go - Operator runner → Registry controller: runs
- Cluster configuration → Registry config: configures
- Registry controller → Registry config: reads
pkg/operator/controller.go - Registry controller → Config bootstrap: bootstraps
pkg/operator/controller.go - Config bootstrap → Registry config: creates
- Registry controller → Workload resources: reconciles
pkg/operator/controller.go - Workload resources → Registry service: uses
- Workload resources → Service CA: uses
- Registry controller → Registry deployment: manages
- Registry controller → Routes: manages
pkg/operator/controller.go - Registry controller → Registry certificates: manages
- Registry controller → Operator status: reports
- Registry controller → Storage selection: selects
pkg/operator/controller.go - Storage selection → S3 storage: selects
pkg/storage/storage.go - Storage selection → Azure storage: selects
pkg/storage/storage.go - Storage selection → GCS storage: selects
pkg/storage/storage.go - Storage selection → IBM COS storage: selects
pkg/storage/storage.go - Storage selection → Swift storage: selects
pkg/storage/storage.go - Storage selection → PVC storage: selects
pkg/storage/storage.go - Storage selection → EmptyDir storage: selects
pkg/storage/storage.go - Registry controller → Image pruner: starts
- Image pruner → Pruner resources: generates
pkg/operator/controllerimagepruner.go - Registry controller → AWS tag controller: coordinates
- Registry controller → Azure path fix: coordinates