Skip to content

Fix default node offerings saved for Kubernetes clusters - #14613

Open
zheng1771 wants to merge 1 commit into
apache:4.22from
zheng1771:fix/14504-cks-default-node-offerings
Open

zheng1771 wants to merge 1 commit into
apache:4.22from
zheng1771:fix/14504-cks-default-node-offerings

Conversation

@zheng1771

Copy link
Copy Markdown

Description

Fixes: #14504

When a Kubernetes cluster uses the default compute offering, its control
and worker node offering IDs are left empty. Only explicit per-node
offerings are saved.

Save the effective offering ID for control and worker nodes when creating
the cluster. Also save it for separate etcd nodes when present. Use the
default offering if no per-node offering is supplied, and keep explicit
overrides. Existing cluster records are not changed.

To reproduce:

  1. Create a Kubernetes cluster with a default compute offering.
  2. Leave the per-node offerings unset in advanced settings.
  3. Check the control and worker offering IDs in the cluster record.

The IDs should contain the selected default offering instead of null.

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)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Missing node offering IDs can affect later cluster scaling.

Screenshots (if appropriate):

Not applicable. Backend change.

How Has This Been Tested?

Tested with OpenJDK 17 and Maven 3.8.7.

All 37 tests in KubernetesClusterManagerImplTest and
KubernetesClusterScaleWorkerTest passed, including four new regression
tests. Required modules compiled and Checkstyle passed.

Full project build and live-cloud testing were not run.

How did you try to break this feature and the system with this change?

Added tests for:

  • A default offering without per-node overrides.
  • A worker override with default control and etcd offerings.
  • Explicit offerings for all node types without a default offering.
  • An etcd offering supplied when there are no separate etcd nodes.

The default-only and partial-override tests failed with the original
storage behavior and passed after the change. Explicit offerings are
preserved, and no etcd offering is saved when separate etcd nodes are absent.

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