bhouse-nexthop opened a new pull request, #14765:
URL: https://github.com/apache/cloudstack/pull/14765

   ### Description
   
   Fixes #14764
   
   CKS deploys the CloudStack cloud controller manager but never starts the 
kubelets with `--cloud-provider=external`, so the CCM never initialises a node: 
no providerID, no zone or instance-type labels, and no cleanup of deleted VMs. 
This connects them, opt-in.
   
   | what | how |
   |---|---|
   | kubelet | `--cloud-provider=external` and `--node-ip` on control and 
worker nodes |
   | setting | `cloud.kubernetes.cluster.external.cloud.provider.enabled`, zone 
scope, default `false` |
   | which clusters | isolated and VPC networks only; direct-access networks 
get no CCM, so they never get the flag |
   | existing clusters | the flag is gated on a new `externalCloudProvider` 
cluster detail, set at create time; scale, add-node and upgrade of older 
clusters keep their nodes as they were |
   | create order | the CCM is deployed as soon as the kube-config is 
available, before the dashboard wait, because add-ons stay Pending until it 
clears the uninitialized taint; a failed deploy now fails the create |
   | cloud config | passes the zone name, so the CCM does not look up its own 
pod name as a VM |
   | provider version | `deploy-provider` and the binaries ISO builder pin the 
v1.3.0 release manifest instead of `main`, and set the image to v1.3.0 (the 
release manifest still names v1.2.0) |
   
   Why opt-in: ISOs built before provider v1.1.0 cannot schedule the CCM on 
tainted nodes, and the CCM has to reach `endpoint.url` before cluster DNS runs. 
That needs an IP address there, or a provider manifest with `hostNetwork` 
(apache/cloudstack-kubernetes-provider#118). Otherwise new nodes stay 
unschedulable.
   
   ### Types of changes
   
   - [x] Bug fix (non-breaking change which fixes an issue)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Bug Severity
   
   - [x] Major
   
   ### How Has This Been Tested?
   
   Unit tests: `KubernetesCluster*Test` in the plugin pass, including 3 new 
ones in `KubernetesClusterActionWorkerTest`.
   
   Lab: a nested KVM lab (3 hosts, Ceph RBD). It runs a main (24.0.0-SNAPSHOT) 
build with this commit picked on top, so it has not been run on a 4.22 build. 
Kubernetes v1.33.13. The ISO was built with `create-kubernetes-binaries-iso.sh` 
and the provider manifest from apache/cloudstack-kubernetes-provider#118 
(`hostNetwork`, `dnsPolicy: Default`). `endpoint.url` is an IP address.
   
   | setting | cluster | result |
   |---|---|---|
   | on | 1 control + 2 workers | every kubelet has `--cloud-provider=external 
--node-ip=<ip>`; the CCM initialised all nodes; uninitialized taint cleared; 
InternalIP, providerID, zone and instance-type set; create finished Running |
   | on | 3 control + 1 worker | same on all 4 nodes |
   | on | scale-up +1 worker, add-node (Ubuntu 24.04 VM) | the new nodes got 
the flag and were initialised |
   | on → off | add-node to the cluster created with it on | the node still got 
the flag (per-cluster detail) |
   | on | LoadBalancer Service | public IP assigned, HTTP 200 through it |
   | off | 1 control + 1 worker | no kubelet flag, CCM deployed and Running as 
before, no taints, all pods Running |
   | n/a | cluster created before the upgrade, scaled after | new node joined 
without the flag, as before |
   
   #### How did you try to break this feature and the system with this change?
   
   - Turned the setting off after creating a cluster, then added a node.
   - Created a cluster with the setting off.
   - Scaled a cluster created by the old packages.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to