Repository navigation
chore: osDiskType field for v1alpha2 - #1903
Merged
Matthew Christopher (matthchr) merged 3 commits intoSep 14, 2026
Merged
Conversation
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>
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>
Contributor
There was a problem hiding this comment.
π’ 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.
Matthew Christopher (matthchr)
approved these changes
Sep 14, 2026
Matthew Christopher (matthchr)
deleted the
comtalyst/fix-osdisk-type-v1alpha2-ssa
branch
September 14, 2026 17:09
1 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
osDiskTypeis declared only in thev1beta1AKSNodeClass schema. Kubernetes server-side apply still consults the retainedv1alpha2schema when an existing object has managed fields recorded in that version, causing the apply to fail becausev1alpha2does not recognize the field.This change copies the existing
v1beta1osDiskTypedefinition into the retainedv1alpha2schema for managed-fields compatibility. The type, enum, optional field, generated OpenAPI schema, validation tests, and hash tests remain in strict parity.v1alpha2remains deprecated and unserved.How was this change tested?
Does this change impact docs?
Release Note