Skip to content

fix(e2e): preserve LocalDNS kubelet configuration parity - #9859

Merged
Nishchay (awesomenix) merged 1 commit into
mainfrom
sharsha/fix-localdns-kubelet-config-parity
Oct 22, 2026
Merged

Nishchay (awesomenix) merged 1 commit into
mainfrom
sharsha/fix-localdns-kubelet-config-parity

Conversation

@SriHarsha001

@SriHarsha001 Sri Harsha (SriHarsha001) commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

  • Set clusterDNS in the kubelet config file when config-file mode is enabled.
  • Use --cluster-dns only in CLI mode, avoiding KUBELET_FLAGS differences between ANC and NBC.
  • Add regression coverage for the affected LocalDNS scenarios.

Which issue(s) this PR fixes:

Fixes #

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Windows Unit Test Results

  3 files   18 suites   1m 10s ⏱️
563 tests 563 ✅ 0 💤 0 ❌
585 runs  585 ✅ 0 💤 0 ❌

Results for commit ee9af9c.

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
test 0% ❌
windows 27% ❌
staging_cse_windows Package 1 65% ➖
debug 0% ❌
provisioningscripts 2% ❌
parts_windows Package 1 73% ➖
Summary 38% (1652 / 6834) ❌

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
shellspec spec 28% ❌
Summary 28% (4556 / 15971) ❌

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
github.com/Azure/agentbaker/aks-node-controller 72% ➖
github.com/Azure/agentbaker/aks-node-controller/common 100% ✔
github.com/Azure/agentbaker/aks-node-controller/helpers 68% ➖
github.com/Azure/agentbaker/aks-node-controller/parser 88% ✔
github.com/Azure/agentbaker/aks-node-controller/pkg/gpu 100% ✔
github.com/Azure/agentbaker/aks-node-controller/pkg/nodeconfigutils 89% ✔
github.com/Azure/agentbaker/aks-node-controller/utils 0% ❌
github.com/Azure/agentbaker/apiserver 24% ❌
github.com/Azure/agentbaker/cmd 0% ❌
github.com/Azure/agentbaker/cmd/starter 0% ❌
github.com/Azure/agentbaker/fuzz/api 0% ❌
github.com/Azure/agentbaker/hotfix/render-nodecustomdata 0% ❌
github.com/Azure/agentbaker/pkg/agent 78% ➖
github.com/Azure/agentbaker/pkg/agent/datamodel 77% ➖
github.com/Azure/agentbaker/pkg/agent/toggles 0% ❌
github.com/Azure/agentbaker/pkg/vhdbuilder/datamodel 87% ✔
Summary 74% (5838 / 7824) ➖

@awesomenix
Nishchay (awesomenix) marked this pull request as ready for review October 22, 2026 01:17
Copilot AI balanced review requested due to automatic review settings October 22, 2026 01:17

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 narrow E2E changes match the existing conversion contract, with no blocking defects identified; tests were not executed.

No open issues 🎉

What changed in this PR

This PR aligns LocalDNS E2E kubelet settings with the selected configuration mode, preserving parity between CSE and aks-node-controller provisioning.

Changes:

  • Set ClusterDns when kubelet config files are enabled; otherwise set --cluster-dns.
  • Add a regression test verifying that LocalDNS mutators preserve config-file settings without reintroducing the flag.
File Description
e2e/​scenario/​scenario_localdns_hosts.go Selects the appropriate DNS setting for hosts-plugin scenarios.
e2e/​scenario/​scenario_localdns_fallback.go Applies the same configuration-mode handling to fallback scenarios.
e2e/​scenario/​node_config_test.go Adds LocalDNS config-file parity assertions.

Review effort: Balanced

@awesomenix
Nishchay (awesomenix) merged commit adefb4e into main Oct 22, 2026
27 of 29 checks passed
@awesomenix
Nishchay (awesomenix) deleted the sharsha/fix-localdns-kubelet-config-parity branch October 22, 2026 01:39
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