Skip to content

fix: align kube-reserved limits with Machine API - #1998

Merged
Robin D. (comtalyst) merged 1 commit into
mainfrom
fix/machine-api-kube-reserved-limits
Oct 13, 2026
Merged

Robin D. (comtalyst) merged 1 commit into
mainfrom
fix/machine-api-kube-reserved-limits

Conversation

@comtalyst

Copy link
Copy Markdown
Collaborator

(AI-generated)

Description

Reject kube-reserved CPU values below 140 millicores and memory values below 750 MiB at AKSNodeClass CRD admission in both API versions, matching the AKS Machine API server contract.

Accepted values continue to pass through unchanged. The positive integration scenario and related valid fixtures now use 1024 MiB; there is no clamping, fallback, or mapper behavior change.

How was this change tested?

  • Red/green envtest coverage for CPU 139/140 and memory 749/750 in v1alpha2 and v1beta1
  • Complete v1alpha2, v1beta1, cloudprovider, instance, and instancetype package suites
  • go test ./test/suites/integration -run '^$' -count=1
  • GOPROXY=https://proxy.golang.org,direct make verify
  • GOPROXY=https://proxy.golang.org,direct make test
  • Independent spec-compliance and code-quality reviews

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened
  • No

Release Note

Validate AKSNodeClass kube-reserved CPU and memory values against the supported Machine API minimums.

Copilot AI balanced review requested due to automatic review settings October 13, 2026 09:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟒 Approval recommended

The validation, generated schemas, boundary coverage, and dependent fixtures are consistent.

0 open findings

What changed in this PR

Aligns kube-reserved validation with AKS Machine API minimums.

Changes:

  • Requires CPU β‰₯140m and memory β‰₯750Mi.
  • Adds boundary validation tests for both API versions.
  • Updates valid test fixtures from 512Mi to 1024Mi.
File Description
test/​suites/​integration/​kubeletconfig_test.go Updates the integration fixture and assertion.
pkg/​providers/​instancetype/​suite_test.go Updates acceptance and cache test fixtures.
pkg/​providers/​instancetype/​instancetype_test.go Updates scheduling override tests.
pkg/​providers/​instance/​aksmachineinstancehelpers_test.go Updates Machine API mapping coverage.
pkg/​cloudprovider/​suite_aksmachineapi_features_test.go Updates cloud-provider feature fixtures.
pkg/​apis/​v1beta1/​crd_validation_cel_test.go Adds minimum boundary tests.
pkg/​apis/​v1beta1/​aksnodeclass.go Defines the new validation minimums.
pkg/​apis/​v1beta1/​aksnodeclass_hash_test.go Updates the valid hash fixture.
pkg/​apis/​v1alpha2/​crd_validation_cel_test.go Adds legacy-version boundary tests.
pkg/​apis/​v1alpha2/​aksnodeclass.go Mirrors validation in the legacy schema.
pkg/​apis/​crds/​karpenter.azure.com_aksnodeclasses.yaml Updates the generated CRD schema.
charts/​karpenter-crd/​templates/​karpenter.azure.com_aksnodeclasses.yaml Updates the generated Helm CRD template.

🧠 Review effort: Balanced


πŸ’‘ Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@comtalyst
Robin D. (comtalyst) merged commit 0cc5bac into main Oct 13, 2026
16 checks passed
@comtalyst
Robin D. (comtalyst) deleted the fix/machine-api-kube-reserved-limits branch October 13, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants