Skip to content

chore: osDiskType field for v1alpha2 - #1903

Merged
Matthew Christopher (matthchr) merged 3 commits into
mainfrom
comtalyst/fix-osdisk-type-v1alpha2-ssa
Sep 14, 2026
Merged

Matthew Christopher (matthchr) merged 3 commits into
mainfrom
comtalyst/fix-osdisk-type-v1alpha2-ssa

Conversation

@comtalyst

@comtalyst Robin D. (comtalyst) commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator

Description

osDiskType is declared only in the v1beta1 AKSNodeClass schema. Kubernetes server-side apply still consults the retained v1alpha2 schema when an existing object has managed fields recorded in that version, causing the apply to fail because v1alpha2 does not recognize the field.

This change copies the existing v1beta1 osDiskType definition into the retained v1alpha2 schema for managed-fields compatibility. The type, enum, optional field, generated OpenAPI schema, validation tests, and hash tests remain in strict parity. v1alpha2 remains deprecated and unserved.

How was this change tested?

Does this change impact docs?

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

Release Note

Keep the retained v1alpha2 schema compatible with historical managedFields entries so v1beta1 server-side apply can set osDiskType.

Co-Authored-By: Claude <noreply@anthropic.com>
@comtalyst Robin D. (comtalyst) changed the title fix: preserve server-side apply compatibility for osDiskType chore: osDiskType field for v1alpha2 Sep 12, 2026
Copy the v1beta1 OSDiskType declaration and field documentation verbatim into v1alpha2 so the retained compatibility schema stays in strict parity.

Co-Authored-By: Claude <noreply@anthropic.com>
Copy the v1beta1 validation and hash cases into v1alpha2 and remove the non-parity cross-version test.

Co-Authored-By: Claude <noreply@anthropic.com>
@comtalyst
Robin D. (comtalyst) marked this pull request as ready for review September 12, 2026 06:58
Copilot AI lite review requested due to automatic review settings September 12, 2026 06:58

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

All reviewed changes are consistent and no unresolved issues were identified.

Pull request overview

Adds osDiskType to the retained v1alpha2 AKSNodeClass schema for server-side apply managed-field compatibility.

Changes:

  • Adds the optional field and enum to the v1alpha2 API.
  • Updates deepcopy support and generated CRD schemas.
  • Adds validation and hash parity tests.
File summaries
File Description
pkg/apis/v1alpha2/zz_generated.deepcopy.go Deep-copies the new field.
pkg/apis/v1alpha2/crd_validation_cel_test.go Tests valid, omitted, and invalid values.
pkg/apis/v1alpha2/aksnodeclass.go Defines the optional OSDiskType field.
pkg/apis/v1alpha2/aksnodeclass_hash_test.go Verifies hash behavior.
pkg/apis/crds/karpenter.azure.com_aksnodeclasses.yaml Updates the v1alpha2 CRD schema.
charts/karpenter-crd/templates/karpenter.azure.com_aksnodeclasses.yaml Synchronizes the Helm CRD template.
Review details

Files not reviewed (1)

  • pkg/apis/v1alpha2/zz_generated.deepcopy.go: Generated file
  • Files reviewed: 5/6 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

@matthchr
Matthew Christopher (matthchr) merged commit 83ef0dd into main Sep 14, 2026
15 checks passed
@matthchr
Matthew Christopher (matthchr) deleted the comtalyst/fix-osdisk-type-v1alpha2-ssa branch September 14, 2026 17:09
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.

3 participants