feat: support LocalDNS and generated kubelet configuration - #264
Draft
hbc (bcho) wants to merge 17 commits into
Draft
feat: support LocalDNS and generated kubelet configuration#264hbc (bcho) wants to merge 17 commits into
hbc (bcho) wants to merge 17 commits into
Conversation
…g-validate # Conflicts: # go.mod # go.sum # pkg/config/adapter.go # pkg/config/config.go
hbc (bcho)
had a problem deploying
to
e2e-testing
August 5, 2026 00:30 — with
GitHub Actions
Failure
hbc (bcho)
marked this pull request as ready for review
August 7, 2026 21:52
hbc (bcho)
marked this pull request as draft
August 7, 2026 21:52
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends AKS FlexNode’s configuration/adapter layer to support AKS LocalDNS profiles (including Corefile template rendering and node label state) and to generate kubelet configuration (including exec image credential provider settings), with accompanying documentation, dependency updates, and E2E coverage updates.
Changes:
- Add LocalDNS profile types, validation, and Corefile template rendering aligned to AKS/AgentBaker behavior, and propagate LocalDNS state via node labels.
- Generate kubelet configuration (maxPods, image GC thresholds, logging verbosity) and support kubelet exec image credential provider config with validation.
- Expand E2E infra/scripts to validate LocalDNS enable/disable and repave drift scenarios; update docs and bump dependencies (Unbounded + k8s libs).
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/config/localdns.go | Exposes LocalDNS types/constants at the public config layer. |
| pkg/config/localdns_test.go | Unit tests for Corefile template rendering and validation behavior. |
| pkg/config/localdns_adapter_test.go | Verifies ToAgentConfig LocalDNS adaptation + node label behavior. |
| pkg/config/kubelet_config_test.go | Adds tests for kubelet exec image credential provider JSON + validation. |
| pkg/config/internal/localdns/testdata/localdns.corefile.golden | Golden output for LocalDNS Corefile template rendering. |
| pkg/config/internal/localdns/localdns.go | Implements LocalDNS contract validation + Corefile template rendering. |
| pkg/config/internal/localdns/localdns_test.go | Golden test coverage for internal LocalDNS rendering. |
| pkg/config/internal/localdns/assets/localdns.corefile.tmpl | Embedded Corefile template used for rendering. |
| pkg/config/copy_test.go | Ensures deep copy covers new kubelet provider pointer. |
| pkg/config/config.go | Adds Networking.LocalDNS and kubelet image credential provider config + validation. |
| pkg/config/adapter.go | Adapts LocalDNS + kubelet configuration into shared agent config. |
| pkg/config/adapter_test.go | Extends adapter tests for kubelet configuration/provider adaptation. |
| hack/e2e/lib/validate.sh | Adds runtime LocalDNS validation checks (service, resolv.conf, nft rules, DNS queries). |
| hack/e2e/lib/upgrade-drift.sh | Adds LocalDNS disable-through-repave drift scenario validation. |
| hack/e2e/lib/node-join-msi.sh | Configures host resolver for LocalDNS and supplies nodeIP + localDNS config in MSI join flow. |
| hack/e2e/lib/infra.sh | Captures MSI VM private IP for nodeIP validation and config generation. |
| hack/e2e/infra/main.bicep | Exposes MSI VM private IP from infra outputs. |
| go.mod | Bumps Unbounded and Kubernetes library versions. |
| go.sum | Updates dependency checksums for bumped modules. |
| docs/usages/configuration.md | Documents LocalDNS profile and kubelet image credential provider settings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+250
to
+253
| ! systemd-run --quiet --pipe --wait --machine="${machine}" systemctl cat localdns.service >/dev/null 2>&1 | ||
| ! ip link show localdns >/dev/null 2>&1 | ||
| ! iptables -w -t raw -S | grep -q 'unbounded-localdns: skip conntrack' | ||
| systemd-run --quiet --pipe --wait --machine="${machine}" \ |
Comment on lines
11
to
13
| github.com/Azure/kubelogin v0.2.15 | ||
| github.com/Azure/unbounded v0.2.2 | ||
| github.com/Azure/unbounded v0.2.3-alpha.1.0.20260806010226-43ec4d137b23 | ||
| github.com/go-logr/logr v1.4.4 |
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.
Summary
v0.2.3-alpha.0Validation
make check