feat: Enable LocalDNS Preferred mode for K8s 1.35+#1401
Merged
Conversation
yewmsft
previously approved these changes
Feb 4, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR lowers the minimum Kubernetes version requirement for enabling LocalDNS in Preferred mode from 1.36+ to 1.35+. This change affects the IsLocalDNSEnabled() method implementation and adds comprehensive test coverage for both API versions.
Changes:
- Updated
IsLocalDNSEnabled()method to enable LocalDNS Preferred mode for Kubernetes 1.35+ (down from 1.36+) - Added comprehensive unit tests for LocalDNS enablement logic in both v1beta1 and v1alpha2 API versions
- Updated function documentation and inline comments to reflect the new version requirement
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/apis/v1beta1/aksnodeclass.go | Updated IsLocalDNSEnabled() to check for K8s >= 1.35 instead of >= 1.36 |
| pkg/apis/v1alpha2/aksnodeclass.go | Updated IsLocalDNSEnabled() to check for K8s >= 1.35 instead of >= 1.36 |
| pkg/apis/v1beta1/aksnodeclass_localdns_test.go | Added comprehensive unit tests for LocalDNS enablement logic covering all modes and version edge cases |
| pkg/apis/v1alpha2/aksnodeclass_localdns_test.go | Added comprehensive unit tests for LocalDNS enablement logic covering all modes and version edge cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tallaxes
approved these changes
Feb 5, 2026
matthchr
approved these changes
Feb 5, 2026
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.
Fixes #
Description
Lower enabling LocalDNS Preferred mode for k8s version 1.35+, lowered from 1.36+.
How was this change tested?
Does this change impact docs?
Release Note