How openshift/library-go works
library-go is a reusable Go library of OpenShift runtime helpers, not a standalone service. Its central product workflow is assembling and running operator controllers that observe cluster state, reconcile resources, and expose status; the tree also shows substantial libraries for registry access, networking, OAuth, templates, and validation. Edges are limited to relationships supported by excerpts, SOURCE INDEX references, or the README; many other listed packages are unsampled, so their internal wiring is not represented.
Main entry points: base_controller.go Controller work queues · controllers.go Static pod assembly · storage.go Resource apply · static_resource_controller.go Static resource sync
Components 29
Operator reconciliation
- Controller manager
pkg/controller/manager/controller_manager.go - Controller work queues
pkg/controller/factory/base_controller.go - Static pod assembly
pkg/operator/staticpod/controllers.go - Static resource sync
pkg/operator/staticresourcecontroller/static_resource_controller.go - CSI storage classes
pkg/operator/csi/csistorageclasscontroller/csi_storageclass_controller.go - Resource apply
pkg/operator/resource/resourceapply/storage.go - Revision rollout
pkg/operator/revisioncontroller/revision_controller.go - Encryption key rotation
pkg/operator/encryption/controllers/key_controller.go - Operator status
pkg/operator/status/status_controller.go - Connectivity checks
pkg/operator/connectivitycheckcontroller/connectivity_check_controller.go - Deployment reconciliation
pkg/operator/deploymentcontroller/deployment_controller.go - Resource synchronization
pkg/operator/resourcesynccontroller/resourcesync_controller.go
Runtime infrastructure
- Image registry client
pkg/image/registryclient/client.go - Image references
pkg/image/reference/reference.go - HTTP transport
pkg/network/httptransport/transport.go - Cryptography
pkg/crypto/crypto.go - Serving configuration
pkg/config/serving/server.go - Config clients
pkg/config/helpers/client.go
Identity and policy
- Service account OAuth
pkg/oauth/oauthserviceaccountclient/oauthclientregistry.go - Authorization scopes
pkg/authorization/scopemetadata/describers.go - Route validation
pkg/route/validation/validation.go - LDAP query builder
pkg/security/ldapquery/query.go - LDAP client
pkg/security/ldapclient/client.go
Domain utilities
- Template processing
pkg/template/templateprocessing/template.go - Template expressions
pkg/template/generator/expressionvalue.go - Manifest access
pkg/manifestclient/get.go - Certificate analysis
pkg/certs/cert-inspection/certgraphanalysis/collector.go - Artifact verification
pkg/verify/verify.go
Other components
- Operator integrator
Connections 24
- Operator integrator → Static pod assembly: assembles controllers
- Static pod assembly → Controller manager: registers controllers
pkg/operator/staticpod/controllers.go - Controller manager → Controller work queues: runs controllers
pkg/controller/manager/controller_manager.go - Static pod assembly → Revision rollout: registers controller
pkg/operator/staticpod/controllers.go - Static pod assembly → Static resource sync: registers controller
pkg/operator/staticpod/controllers.go - Static resource sync → Controller work queues: uses framework
pkg/operator/staticresourcecontroller/static_resource_controller.go - Static resource sync → Resource apply: applies resources
pkg/operator/staticresourcecontroller/static_resource_controller.go - CSI storage classes → Controller work queues: uses framework
pkg/operator/csi/csistorageclasscontroller/csi_storageclass_controller.go - CSI storage classes → Resource apply: applies storage
pkg/operator/csi/csistorageclasscontroller/csi_storageclass_controller.go - Revision rollout → Controller work queues: uses framework
pkg/operator/revisioncontroller/revision_controller.go - Revision rollout → Resource apply: uses patch helpers
pkg/operator/revisioncontroller/revision_controller.go - Encryption key rotation → Controller work queues: uses framework
pkg/operator/encryption/controllers/key_controller.go - Operator status → Controller work queues: uses framework
pkg/operator/status/status_controller.go - Connectivity checks → Controller work queues: uses framework
pkg/operator/connectivitycheckcontroller/connectivity_check_controller.go - Deployment reconciliation → Controller work queues: uses framework
pkg/operator/deploymentcontroller/deployment_controller.go - Deployment reconciliation → Resource apply: applies resources
pkg/operator/deploymentcontroller/deployment_controller.go - Resource synchronization → Controller work queues: uses framework
- Image registry client → Image references: uses references
pkg/image/registryclient/client.go - HTTP transport → Cryptography: uses crypto
pkg/network/httptransport/transport.go - Config clients → Serving configuration: configures clients
- Service account OAuth → Authorization scopes: uses scope metadata
pkg/oauth/oauthserviceaccountclient/oauthclientregistry.go - Route validation → Authorization scopes: uses authorization utilities
- LDAP client → LDAP query builder: uses LDAP utilities
- Template processing → Template expressions: uses expressions
pkg/template/templateprocessing/template.go