Repository navigation
Use the node type's offering for CKS scale accounting - #14806
bhouse-nexthop wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #14806 +/- ##
============================================
+ Coverage 18.31% 18.33% +0.01%
- Complexity 16642 16662 +20
============================================
Files 5939 5939
Lines 537787 537808 +21
Branches 65932 65937 +5
============================================
+ Hits 98510 98604 +94
+ Misses 428072 427985 -87
- Partials 11205 11219 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Tested in a nested KVM lab on a 24.0-based build that carries this PR (and #14808). Cluster with 1 control + 1 worker; cluster offering 2 cores / 4 GB.
The stored cores and memory matched the node VMs after every step. The new worker came up on the worker offering, not the cluster offering. All nodes were Ready at the end. |
|
Lab test on a 4.22-based build with this PR plus the related CKS PRs: KVM, cluster with control on a 2c/4G offering and workers moved to a 2c/5G offering (scale with
|
Scaling a CKS cluster with per-node-type offerings got the capacity check and the stored cores/memory wrong: | Path | Before | Now | |---|---|---| | Capacity check before adding workers | cluster offering | worker offering | | Cores/memory after a size-only scale | new workers counted at the cluster offering | worker offering | | Cores/memory after an offering scale | old offering read from the VMs after they were upgraded, so nothing changed | old offering read from the cluster's node type offering | | Nodes added with addNodesToKubernetesCluster | upgraded by a worker offering scale and counted at the worker offering | left on their own offering; their cores/memory stay as counted when added | The node type's offering falls back to the cluster offering when none is set, as VM deployment already does. Signed-off-by: Brad House <bhouse@nexthop.ai>
7df09c0 to
d7e2114
Compare
|
Lab test of the amendment (added nodes left out of offering scale) on a 4.22-based build (e19539e): KVM, isolated network. Offerings: control C 2 vCPU/4096 MB, workers W 2/2048, W2 4/4096, and A 4/8192 for the added node.
Offerings were checked both in the cluster's VM map and on the VMs themselves (listVirtualMachines cpunumber/memory). |
Description
This PR makes CKS scaling use the node type's offering for capacity planning and for the cluster's stored cores/memory.
addNodesToKubernetesClusterThe node type's offering falls back to the cluster offering when none is set, same as VM deployment (
getServiceOfferingForNodeTypeOnCluster).Fixes: #14805
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
KubernetesClusterScaleWorkerTest:KubernetesClusterScaleWorkerTest,KubernetesClusterManagerImplTest,KubernetesClusterActionWorkerTest,KubernetesClusterResourceModifierActionWorkerTestpass.How did you try to break this feature and the system with this change?