Skip to content

cks node groups - #14594

Open
argrinberg wants to merge 4 commits into
apache:mainfrom
Telecom-Cloud-UzCloud:cks-node-groups
Open

argrinberg wants to merge 4 commits into
apache:mainfrom
Telecom-Cloud-UzCloud:cks-node-groups

Conversation

@argrinberg

@argrinberg argrinberg commented Nov 6, 2026 •

Copy link
Copy Markdown

Description

Adds node groups (node pools) to CloudManaged CKS clusters. Every cluster gets a default node group holding the worker nodes of the cluster size; additional node groups have their own service offering, template, Kubernetes labels and taints, and autoscaling settings. Nodes can also have their own labels and taints on top of the ones of their node group.

  • New APIs: createKubernetesClusterNodeGroup, listKubernetesClusterNodeGroups, updateKubernetesClusterNodeGroup, scaleKubernetesClusterNodeGroup, deleteKubernetesClusterNodeGroup, updateKubernetesClusterNode
  • Existing clusters get their default node group on management server startup; scaleKubernetesCluster keeps working and applies to the default node group
  • Operations on different node groups of a cluster can run concurrently; failures only affect the node group
  • The cluster autoscaler is deployed with one --nodes argument per autoscaled node group. Node groups other than the default one need an autoscaler image supporting node groups, set by the new cloud.kubernetes.cluster.autoscaler.image global setting (the upstream image only supports the default node group)
  • UI: Node groups tab with expandable nodes, forms for node groups and node labels/taints; the cluster list shows the total number of worker nodes

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Screenshots (if appropriate):

How Has This Been Tested?

  • Unit tests: all 174 tests of the kubernetes-service plugin pass
  • Manual testing on a single host KVM zone (Ubuntu 24.04, Kubernetes 1.33): cluster creation, default node group creation for an existing cluster, creating, scaling (including concurrent scaling of several node groups), updating and deleting node groups, node labels and taints applied to the Kubernetes nodes, autoscaling of the default node group

Documentation PR: apache/cloudstack-documentation#699

Node groups are pools of worker nodes of a CloudManaged Kubernetes
cluster with their own service offering, template, Kubernetes labels,
taints and autoscaling settings. Every cluster has a default node group
holding the worker nodes of the cluster size. The nodes of the node
groups are linked to them in the cluster VM map, along with their own
labels and taints.
- New APIs to create, list, update, scale and delete the node groups of
  a cluster, and to update the labels and taints of a node.
- Node group nodes are registered with the node group label, labels and
  taints through the kubelet; label and taint changes are applied to the
  existing nodes, merging the ones of the node group with the ones of
  each node.
- The default node group is created with the cluster, and on startup for
  the existing clusters. It can not be deleted, keeps at least one node
  and only allows PreferNoSchedule taints so that the system pods can
  run. The cluster scale API applies to it and keeps it in sync.
- Operations on different node groups of a cluster can run at the same
  time: the cluster stays Scaling while they are in progress, network
  rules and counters are updated under locks, failed scale ups only
  clean up their own nodes and failures move the node group to Error.
- The cluster autoscaler is deployed with one --nodes argument per node
  group with autoscaling enabled. Node groups other than the default one
  require an autoscaler image supporting node groups, set by
  cloud.kubernetes.cluster.autoscaler.image.
- The cluster response has the total number of worker nodes and the node
  groups of the cluster.
Adds a node groups tab to Kubernetes clusters to create, scale, update
and delete node groups with their labels, taints and autoscaling
settings, and to list the nodes of each node group and edit their own
labels and taints. The cluster list shows the total number of worker
nodes and the cluster scale dialog is labelled for the default node
group.
@boring-cyborg

boring-cyborg Bot commented Nov 6, 2026

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
Here are some useful points:

@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 16.17807% with 1544 lines in your changes missing coverage. Please review.
✅ Project coverage is 20.75%. Comparing base (fb60564) to head (840e693).

Files with missing lines Patch % Lines
...bernetes/cluster/KubernetesClusterManagerImpl.java 7.99% 597 Missing and 13 partials ⚠️
...ctionworkers/KubernetesClusterNodeGroupWorker.java 9.12% 217 Missing and 2 partials ⚠️
...i/response/KubernetesClusterNodeGroupResponse.java 0.00% 103 Missing ⚠️
...KubernetesClusterResourceModifierActionWorker.java 9.30% 77 Missing and 1 partial ⚠️
...bernetes/cluster/KubernetesClusterNodeGroupVO.java 28.70% 76 Missing and 1 partial ⚠️
...nodegroup/CreateKubernetesClusterNodeGroupCmd.java 0.00% 57 Missing ⚠️
...nodegroup/UpdateKubernetesClusterNodeGroupCmd.java 0.00% 52 Missing ⚠️
...ck/api/response/KubernetesClusterNodeResponse.java 0.00% 43 Missing ⚠️
...etes/nodegroup/UpdateKubernetesClusterNodeCmd.java 0.00% 41 Missing ⚠️
...cluster/dao/KubernetesClusterNodeGroupDaoImpl.java 0.00% 40 Missing ⚠️
... and 14 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14594      +/-   ##
============================================
- Coverage     20.78%   20.75%   -0.04%     
- Complexity    21931    22010      +79     
============================================
  Files          6496     6513      +17     
  Lines        591657   593781    +2124     
  Branches      72592    72909     +317     
============================================
+ Hits         122966   123227     +261     
- Misses       455346   457175    +1829     
- Partials      13345    13379      +34     
Flag Coverage Δ
uitests 3.85% <ø> (-0.03%) ⬇️
unittests 22.06% <16.17%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant