Repository navigation
CKS: prevent individual Instance compute offering changes on managed cluster nodes - #14605
andrijapanicsb wants to merge 2 commits into
Conversation
Validate compute offering changes at both VM API entry points and hide individual scaling for CloudManaged Kubernetes cluster members. Keep ExternalManaged and ordinary instances unchanged, and preserve the internal resizing methods used by CKS cluster and node-type scaling. Fixes: apache#14553 Signed-off-by: Andrija Panic <andrija.panic@gmail.com>
|
@ACSHomeBot package |
|
Accepted: Planned: RPM + DEB, KVM SystemVM. Status: Completed. Packaging results. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #14605 +/- ##
============================================
+ Coverage 20.78% 20.80% +0.02%
- Complexity 21931 21943 +12
============================================
Files 6496 6496
Lines 591657 591700 +43
Branches 72592 72597 +5
============================================
+ Hits 122966 123114 +148
+ Misses 455346 455198 -148
- Partials 13345 13388 +43
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:
|
Packaging results:
Test packages are available at: |
|
@blueorangutan package |
|
@andrijapanicsb a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19930 |
The deprecated changeServiceForVirtualMachine API is synchronous, so the CloudRuntimeException from the guard reached the generic API handler, and non-admin owners got "Internal error executing command" instead of the reason. Throw InvalidParameterValueException instead: the API shows its message to every caller. The guard still runs at the same place, before any change, and internal cluster scaling is not affected.
|
@ACSHomeBot package |
|
Accepted: Planned: RPM + DEB, KVM SystemVM. Status: Failed. Packaging results:
No public repository was promoted. Status: Package building failed. |
CloudManaged Kubernetes nodes can currently be resized individually through the Instances view or VM APIs.
This leaves the VM resources out of sync with the cluster configuration and reported capacity and later messes up cluster-level scaling.
This change prevents individual compute offering changes for those nodes. Resizing remains available through the Kubernetes cluster scaling operations. Ordinary instances and ExternalManaged clusters retain their existing behaviour.
Fixes #14553
Changes
Cluster scaling
Validation is limited to the VM API entry points. Internal offering-change methods remain unchanged for cluster-wide and node-group resizing, including the paths used by #14223.
Tests
Tests cover blocked API operations, permitted ordinary and ExternalManaged instances, adopted nodes, UI visibility, and internal stopped/live resizing.
Scope
This change guards compute offering replacement. Dynamic resource changes through updateVirtualMachine details and the resource-detail APIs remain separate follow-up work.