Controller architecture
This page shows how Kube-DC controllers turn platform custom resources into Kubernetes, network, identity, storage, and security state. It is an operator view: resource names and component responsibilities are shown, but source-code paths and implementation details are intentionally omitted.
High-level topology
Controller groups
The kube-dc manager runs these controller groups:
| Controller group | Watches | Main responsibility |
|---|---|---|
| Organization and Project controllers | Organizations, Projects, OrganizationGroups | Create backing namespaces, identity mappings, RBAC, default Project networking, quotas, and Project lifecycle state. Project reconciliation also reads GoldenImageSelections to choose which golden image each family seeds from. |
| Organization integration controllers | EventWebhooks, MachineIdentities, VerifiedDomains, MCPApps | Deliver an Organization's platform-event webhooks, issue non-human Keycloak identities, verify domain ownership with a DNS TXT record, and register AI apps for the hosted MCP endpoint. |
| Network controllers | EIp and FIp resources, LoadBalancer Services | Allocate and bind external addresses, program Kube-OVN objects, and keep service load balancers attached to the right routers and switches. |
| Addressing controllers | AddressReservations, AddressArenas, PodIPConflicts | Keep reserved ranges of a Project subnet out of Kube-OVN IPAM, serialize claims on each subnet, and record and remediate Pod addresses that another host already answers for. |
| Tenant VLAN controllers | FabricSegments, FabricSegmentAllocations, ProjectNetworks | Declare physical segments, offer them to Organizations, and attach Projects to a datacenter VLAN. ProjectNetwork owns the VlanReservation that proves one Project holds a segment. The manager registers these controllers only when the tenant VLAN CRDs are installed. |
| Routed network controllers | RoutingFabrics, RoutedNetworkAllocations, ProjectRouteAttachments | Define the routing fabric, grant it to Organizations, and connect a Project VPC to a Routed Network. ProjectRouteAttachment owns the generated ProjectRoutingGateway. The manager registers these controllers only when routedNetwork.enabled is true and the CRDs are installed. |
| Platform endpoint controllers | Annotated selectorless platform Services and Nodes | Probe eligible node backends and maintain companion EndpointSlices; charts and Fleet own the VIP, Gateway, routes, and certificates. |
| Security controllers | ManagedSecrets, ManagedCertificates, KMSKeys, ObjectBucketKeyRotations, KdcClusters | Bridge Project security resources to OpenBao, cert-manager, projected Kubernetes Secrets, and status rollups. They rotate object bucket keys and reconcile the OpenBao policy and role for each Managed Cluster's etcd encryption. |
| Application and infrastructure controllers | Deployments, Secrets, CronJobs, the gateway and trust resources | Record application releases for rollback, restart workloads after a referenced Secret changes, follow application images in CronJobs, maintain the per-Project infra-attachment security group, distribute the platform trust bundle, and issue Gateway TLS certificates through cert-manager (ACME). |
| Managed-service provider controllers | ServiceDatabaseConnections, ServiceDatabaseRoles, ServicePlaneTrusts | Provider-only records in the managed-services namespace. They hold the OpenBao database connection and roles behind each ServiceBinding, and enroll service runners with OpenBao. |
| Status aggregation | Project security and platform state | Roll child-resource readiness into higher-level Project and Organization status so operators and UI users see one clear state. |
A ServiceCredentialPolicy is a managed-services resource. The managed services hub reconciles it, not the kube-dc manager.
Project lifecycle
Network flow
Kube-DC has two address concepts:
- EIp is the allocated external address object. It can back a Project gateway, a service load balancer, or another higher-level resource.
- FIp creates a 1:1 NAT mapping from an EIp to either a selected VM
interface (
vmTarget) or an explicit internal workload address (ipAddress). The guest or Pod keeps its internal address.
The controller keeps ownership and status on the Kube-DC resources while Kube-OVN owns the low-level routing, NAT, and load-balancer programming.
Security flow
Security controllers validate and reconcile Project-scoped requests while keeping backend credentials and privileged operations in platform service accounts. Ready conditions on child resources are aggregated so the Project status can show whether its security dependencies are usable.
Platform endpoint flow
The chart and Fleet configuration own the MetalLB pool, advertisement,
LoadBalancer Service, Gateway resources, routes, and certificates. The
PlatformEndpointReconciler does not create those objects. It watches an
explicitly annotated selectorless Service, health-probes the eligible node
backends, and maintains the Service's companion EndpointSlice.
For topologies that cannot hairpin through the public address, vpc-dns
rewrites platform hostnames to the internal VIP. This keeps the hostname and TLS
identity unchanged while selecting a reachable path. See
Internal platform endpoints.
Read the diagram
- The CLI and Fleet repository define desired state.
- Flux applies that state to the management cluster.
- Kube-DC controllers reconcile custom resources and selected Kubernetes resources into real platform state.
- External platform systems such as Keycloak, OpenBao, Kube-OVN, KubeVirt, cert-manager, Envoy Gateway, and observability components do the specialized work.
- Status flows back to Kube-DC resources so the UI, CLI, and operators can read the platform state from Kubernetes.