# openshift/cluster-kube-apiserver-operator architecture

> Architecture diagram of the GitHub repository openshift/cluster-kube-apiserver-operator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/openshift/cluster-kube-apiserver-operator
- Repository: https://github.com/openshift/cluster-kube-apiserver-operator

## Overview

This repository implements the OpenShift Kubernetes API Server Operator: it observes cluster configuration, prepares and manages the API server’s static-pod deployment, and provides supporting certificate, connectivity, readiness, and recovery functions. The principal workflow is cluster configuration observation followed by configuration assembly and operator management of the API server. The README documents this high-level flow; source excerpts show command registration and selected controller behavior, but do not expose all runtime wiring, so unsupported internal links are omitted.

Main entry points: [`cmd/cluster-kube-apiserver-operator/main.go`](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/cmd/cluster-kube-apiserver-operator/main.go) (Operator binary), [`pkg/operator/starter.go`](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/starter.go) (Operator runtime), [`pkg/operator/configobservation/configobservercontroller/observe_config_controller.go`](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/configobservation/configobservercontroller/observe_config_controller.go) (Configuration observer), [`pkg/cmd/checkendpoints/controller/connection_checker.go`](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/cmd/checkendpoints/controller/connection_checker.go) (Endpoint checks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Commands"]
  node_operator_binary["Operator binary<br/>[main.go]"]
  node_operator_command["Operator command<br/>[cmd.go]"]
  node_render_command["Bootstrap renderer<br/>[render.go]"]
  node_resource_graph["Resource graph<br/>[resourcegraph.go]"]
end

subgraph group_configuration["Configuration"]
  node_config_observer["Configuration observer"]
  node_auth_observation["Authentication observation"]
  node_webhook_observation["Webhook observation"]
  node_etcd_observation["etcd endpoint observation"]
  node_target_config["Target configuration"]
end

subgraph group_operation["Operator management"]
  node_operator_runtime["Operator runtime<br/>[starter.go]"]
  node_cert_rotation["Certificate rotation"]
  node_sa_token_signer["Service-account signer<br/>[controller.go]"]
  node_service_account_issuer["Service-account issuer"]
  node_resource_sync["Resource sync"]
  node_recovery["API server recovery<br/>[apiserver.go]"]
end

subgraph group_support["Operations support"]
  node_endpoint_checks["Endpoint checks"]
  node_connectivity_checks["Connectivity checks"]
  node_updates_manager["Check update queue<br/>[updates_manager.go]"]
  node_readiness["Startup readiness"]
  node_encryption_status["Encryption status<br/>[provider.go]"]
end

node_cvo(("Cluster Version Operator"))

node_cvo -->|"installs"| node_operator_binary
node_operator_binary -->|"registers"| node_operator_command
node_operator_binary -->|"registers"| node_render_command
node_operator_binary -->|"registers"| node_resource_graph
node_operator_binary -->|"invokes"| node_operator_runtime
node_config_observer -->|"includes observer"| node_auth_observation
node_config_observer -->|"includes observer"| node_webhook_observation
node_config_observer -->|"includes observer"| node_etcd_observation
node_config_observer -.->|"informs configuration"| node_target_config
node_operator_runtime -.->|"runs controller"| node_cert_rotation
node_operator_runtime -.->|"runs controller"| node_sa_token_signer
node_operator_runtime -.->|"runs controller"| node_service_account_issuer
node_operator_runtime -.->|"runs controller"| node_resource_sync
node_operator_runtime -.->|"uses recovery"| node_recovery
node_operator_binary -->|"registers command"| node_endpoint_checks
node_endpoint_checks -.->|"uses queue"| node_updates_manager
node_operator_runtime -.->|"runs controller"| node_connectivity_checks
node_operator_binary -->|"configures readiness"| node_readiness
node_operator_binary -->|"configures provider"| node_encryption_status

click node_operator_binary "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/cmd/cluster-kube-apiserver-operator/main.go"
click node_operator_command "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/cmd/operator/cmd.go"
click node_render_command "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/cmd/render/render.go"
click node_resource_graph "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/cmd/resourcegraph/resourcegraph.go"
click node_config_observer "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/configobservation/configobservercontroller/observe_config_controller.go"
click node_auth_observation "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/configobservation/auth/auth_serviceaccountissuer.go"
click node_webhook_observation "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/configobservation/auth/webhook_authenticator.go"
click node_etcd_observation "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/configobservation/etcdendpoints/observe_etcd_endpoints.go"
click node_target_config "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/targetconfigcontroller/targetconfigcontroller.go"
click node_operator_runtime "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/starter.go"
click node_cert_rotation "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/certrotationcontroller/certrotationcontroller.go"
click node_sa_token_signer "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/boundsatokensignercontroller/controller.go"
click node_service_account_issuer "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/serviceaccountissuercontroller/serviceaccountissuer_controller.go"
click node_resource_sync "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/resourcesynccontroller/resourcesynccontroller.go"
click node_recovery "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/recovery/apiserver.go"
click node_endpoint_checks "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/cmd/checkendpoints/controller/connection_checker.go"
click node_connectivity_checks "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/connectivitycheckcontroller/connectivity_check_controller.go"
click node_updates_manager "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/cmd/checkendpoints/controller/updates_manager.go"
click node_readiness "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/startupmonitorreadiness/readiness_checks.go"
click node_encryption_status "https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/encryptionstatusprovider/provider.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_operator_binary,node_operator_command,node_render_command,node_resource_graph toneBlue
class node_config_observer,node_auth_observation,node_webhook_observation,node_etcd_observation,node_target_config toneAmber
class node_operator_runtime,node_cert_rotation,node_sa_token_signer,node_service_account_issuer,node_resource_sync,node_recovery toneMint
class node_endpoint_checks,node_connectivity_checks,node_updates_manager,node_readiness,node_encryption_status toneRose
class node_cvo toneIndigo
```

## Components

### Commands

- [Operator binary](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/cmd/cluster-kube-apiserver-operator/main.go): `cmd/cluster-kube-apiserver-operator/main.go`
- [Operator command](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/cmd/operator/cmd.go): `pkg/cmd/operator/cmd.go`
- [Bootstrap renderer](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/cmd/render/render.go): `pkg/cmd/render/render.go`
- [Resource graph](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/cmd/resourcegraph/resourcegraph.go): `pkg/cmd/resourcegraph/resourcegraph.go`

### Configuration

- [Configuration observer](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/configobservation/configobservercontroller/observe_config_controller.go): `pkg/operator/configobservation/configobservercontroller/observe_config_controller.go`
- [Authentication observation](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/configobservation/auth/auth_serviceaccountissuer.go): `pkg/operator/configobservation/auth/auth_serviceaccountissuer.go`
- [Webhook observation](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/configobservation/auth/webhook_authenticator.go): `pkg/operator/configobservation/auth/webhook_authenticator.go`
- [etcd endpoint observation](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/configobservation/etcdendpoints/observe_etcd_endpoints.go): `pkg/operator/configobservation/etcdendpoints/observe_etcd_endpoints.go`
- [Target configuration](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/targetconfigcontroller/targetconfigcontroller.go): `pkg/operator/targetconfigcontroller/targetconfigcontroller.go`

### Operator management

- [Operator runtime](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/starter.go): `pkg/operator/starter.go`
- [Certificate rotation](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/certrotationcontroller/certrotationcontroller.go): `pkg/operator/certrotationcontroller/certrotationcontroller.go`
- [Service-account signer](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/boundsatokensignercontroller/controller.go): `pkg/operator/boundsatokensignercontroller/controller.go`
- [Service-account issuer](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/serviceaccountissuercontroller/serviceaccountissuer_controller.go): `pkg/operator/serviceaccountissuercontroller/serviceaccountissuer_controller.go`
- [Resource sync](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/resourcesynccontroller/resourcesynccontroller.go): `pkg/operator/resourcesynccontroller/resourcesynccontroller.go`
- [API server recovery](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/recovery/apiserver.go): `pkg/recovery/apiserver.go`

### Operations support

- [Endpoint checks](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/cmd/checkendpoints/controller/connection_checker.go): `pkg/cmd/checkendpoints/controller/connection_checker.go`
- [Connectivity checks](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/connectivitycheckcontroller/connectivity_check_controller.go): `pkg/operator/connectivitycheckcontroller/connectivity_check_controller.go`
- [Check update queue](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/cmd/checkendpoints/controller/updates_manager.go): `pkg/cmd/checkendpoints/controller/updates_manager.go`
- [Startup readiness](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/startupmonitorreadiness/readiness_checks.go): `pkg/operator/startupmonitorreadiness/readiness_checks.go`
- [Encryption status](https://github.com/openshift/cluster-kube-apiserver-operator/blob/main/pkg/operator/encryptionstatusprovider/provider.go): `pkg/operator/encryptionstatusprovider/provider.go`

### Other components

- **Cluster Version Operator**

## Connections

- Cluster Version Operator → Operator binary: installs (evidence: `README.md`)
- Operator binary → Operator command: registers (evidence: `cmd/cluster-kube-apiserver-operator/main.go`)
- Operator binary → Bootstrap renderer: registers (evidence: `cmd/cluster-kube-apiserver-operator/main.go`)
- Operator binary → Resource graph: registers (evidence: `cmd/cluster-kube-apiserver-operator/main.go`)
- Operator binary → Operator runtime: invokes (evidence: `cmd/cluster-kube-apiserver-operator/main.go`)
- Configuration observer → Authentication observation: includes observer (evidence: `pkg/operator/configobservation/configobservercontroller/observe_config_controller.go`)
- Configuration observer → Webhook observation: includes observer (evidence: `pkg/operator/configobservation/configobservercontroller/observe_config_controller.go`)
- Configuration observer → etcd endpoint observation: includes observer (evidence: `pkg/operator/configobservation/configobservercontroller/observe_config_controller.go`)
- Configuration observer → Target configuration: informs configuration
- Operator runtime → Certificate rotation: runs controller
- Operator runtime → Service-account signer: runs controller
- Operator runtime → Service-account issuer: runs controller
- Operator runtime → Resource sync: runs controller
- Operator runtime → API server recovery: uses recovery
- Operator binary → Endpoint checks: registers command (evidence: `cmd/cluster-kube-apiserver-operator/main.go`)
- Endpoint checks → Check update queue: uses queue
- Operator runtime → Connectivity checks: runs controller
- Operator binary → Startup readiness: configures readiness (evidence: `cmd/cluster-kube-apiserver-operator/main.go`)
- Operator binary → Encryption status: configures provider (evidence: `cmd/cluster-kube-apiserver-operator/main.go`)
