How keyfactor/command-cert-manager-issuer works
Command Issuer is a Kubernetes cert-manager controller that turns CertificateRequests into certificates enrolled through Keyfactor Command. Issuer and ClusterIssuer resources provide connection, credential, CA-bundle, and enrollment configuration; reconciliation checks request and issuer readiness, then the Command client performs enrollment. The sampled excerpts show request and issuer reconciliation, credential/configuration reads, and Command API operations. Manager wiring and some controller-to-client calls are not fully visible, so those links are omitted or marked unverified.
Main entry points: certificaterequest_controller.go Request reconciliation · issuer_controller.go Issuer readiness · command.go Command configuration · client.go Command API client
Components 16
Kubernetes API
- CertificateRequest
- Issuer resources
api/v1alpha1/issuer_types.go - ClusterIssuer
api/v1alpha1/clusterissuer_types.go - Credential and CA data
Reconciliation
- Request reconciliation
internal/controller/certificaterequest_controller.go - Issuer readiness
internal/controller/issuer_controller.go - Controller manager
cmd/main.go
Command integration
- Command configuration
internal/command/command.go - Client cache
internal/command/client_cache.go - Command API client
internal/command/client.go - CSR enrollment
internal/command/command.go
External systems
- Identity providers
- Keyfactor Command
- cert-manager
- Kubernetes API
Other components
- Cluster operator
Connections 23
- Cluster operator → Issuer resources: configures
api/v1alpha1/issuer_types.go - Cluster operator → ClusterIssuer: configures
api/v1alpha1/clusterissuer_types.go - cert-manager → CertificateRequest: creates
README.md - CertificateRequest → Request reconciliation: reconciles
internal/controller/certificaterequest_controller.go - Request reconciliation → Issuer resources: loads issuer
internal/controller/certificaterequest_controller.go - Request reconciliation → ClusterIssuer: loads issuer
internal/controller/certificaterequest_controller.go - Request reconciliation → Credential and CA data: reads credentials
- Issuer readiness → Issuer resources: reconciles
internal/controller/issuer_controller.go - Issuer readiness → Credential and CA data: reads credentials
internal/controller/issuer_controller.go - Controller manager → Request reconciliation: registers
- Controller manager → Issuer readiness: registers
- Request reconciliation → Command configuration: builds config
- Issuer readiness → Command configuration: checks health
- Controller manager → Client cache: creates
cmd/main.go - Command configuration → Client cache: uses cached clients
- Client cache → Command API client: creates clients
internal/command/client_cache.go - Command configuration → Command API client: configures
internal/command/command.go - Command API client → Identity providers: gets tokens
internal/command/client.go - CSR enrollment → Command API client: submits CSR
internal/command/command.go - CSR enrollment → Keyfactor Command: enrolls certificate
README.md - Keyfactor Command → CSR enrollment: returns certificate
internal/command/command.go - Kubernetes API → Request reconciliation: provides request
internal/controller/certificaterequest_controller.go - Kubernetes API → Issuer readiness: provides issuer
internal/controller/issuer_controller.go