mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
On the cozyplane networking variant a VPC refuses cluster-internal destinations, so a tenant cluster whose workers join a VPC must bring its control plane along: the workers, the tenant's own pods and the konnectivity agents all need an apiserver address inside the VPC. The platform side keeps working unchanged, since it reaches VPC pods by their fabric IPs and through ClusterIPs that resolve to them. network.name on the Kubernetes cluster puts the apiserver pods in the VPC, attaches their Service to it, and stamps the cluster's own etcd, whose operator copies the annotation onto the members and both etcd Services, so the apiserver reaches its DataStore inside the VPC too. The same value on each KubernetesNodes pool stamps its worker VM template. Kamaji's advertise address must be an IP that tenant consumers reach, which here is the VIP the VPC knows the apiserver Service by. Only a pod inside the VPC can learn it, so the pools' talos-reconcile Job starts a probe pod in the VPC, reads the address it resolves back from its termination message, advertises it, and gives it to the workers' host entries in place of the ClusterIP. The cluster refuses a VPC where sdn.cozystack.io is not served, on the proxmox substrate, on the tenant's shared DataStore, and on a running cluster outside that VPC, since etcd-operator never moves a running member. A pool refuses a network that differs from its control plane's. Both checks hold where a live object does not exist yet: the pools' reconcile Job compares the apiserver Service's VPC before the probe, and the etcd render compares the live EtcdCluster's. The probe's Role grants only get and delete, so a probe left by an interrupted attempt is deleted without waiting and polled with get. network.name is a DNS-1123 label in both apps, and every annotation carrying it is quoted. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>