feat(aks-node-controller): add kubelet config fields for flag migration - #9576
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
Windows Unit Test Results 3 files 17 suites 49s ⏱️ Results for commit 95b4519. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
🟢 Approval recommended
The schema additions are backward-compatible, accurately generated, documented, and comprehensively tested without changing runtime activation.
Pull request overview
Adds additive kubelet configuration schema support without activating flag migration.
Changes:
- Adds seven protobuf fields and structured taints.
- Regenerates Go protobuf bindings.
- Adds compatibility, serialization, and no-activation tests.
File summaries
| File | Description |
|---|---|
aks-node-controller/proto/README.md |
Documents schema and migration constraints. |
aks-node-controller/proto/aksnodeconfig/v1/kubelet_config.proto |
Defines new kubelet fields and taints. |
aks-node-controller/pkg/gen/aksnodeconfig/v1/kubelet_config.pb.go |
Updates generated Go bindings. |
aks-node-controller/parser/kubelet_config_test.go |
Covers serialization and compatibility behavior. |
Review details
Files not reviewed (1)
- aks-node-controller/pkg/gen/aksnodeconfig/v1/kubelet_config.pb.go: Generated file
- Files reviewed: 3/4 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
There was a problem hiding this comment.
🟢 Approval recommended
The additive schema changes preserve existing wire numbers and serialized output while receiving comprehensive regression coverage.
Review details
Files not reviewed (1)
- aks-node-controller/pkg/gen/aksnodeconfig/v1/kubelet_config.pb.go: Generated file
- Files reviewed: 6/7 changed files
- Comments generated: 0 new
- Review effort level: Balanced
What this PR does / why we need it:
Add seven missing
KubeletConfigFileConfigfields toaks-node-controlleras a prerequisite for a later kubelet flag-to-config migration. The existing serializers already handle these fields, so no handwritten production parser changes are needed. (Upstream Kubernetes is pushing everyone off flags — as of v1.37, AddKubeletConfigFlags marks every flag that has a config-file equivalent as deprecated. So AKS eventually has to move.)No customer impact. This is additive schema support only. Existing callers leave the new fields unset and retain their existing serialized output. No producer populates the fields in this PR; no CLI flags are removed, config-file delivery enabled, version gates changed, or provisioning scripts modified. Future activation/flag cleanup must be a separate change restricted to stable Kubernetes agent-pool versions >=1.38. Existing versions remain unchanged.
Changes
enableServer, preserving omitted versus explicitfalse."0s", and structured taints (key,value,effect, optional RFC3339timeAdded).Upstream references
Kubernetes deprecates config-backed flags in
AddKubeletConfigFlags, directing users to--config. The seven corresponding registrations are linked individually:--enable-serverenableServer--volume-plugin-dirvolumePluginDir--cgroup-drivercgroupDriver--runtime-request-timeoutruntimeRequestTimeout--container-runtime-endpointcontainerRuntimeEndpoint--register-with-taintsregisterWithTaints--hairpin-modehairpinModeField names/types match the kubelet v1beta1 configuration API and core Taint type. This is not a claim of Kubernetes 1.38 runtime validation.
Validation
Run from
aks-node-controller:go test -mod=readonly ./parser -run 'TestKubeletConfig|Test_getKubeletConfigFileContent' -count=1— passed.go build -mod=readonly ./...— passed.go test -mod=readonly ./... -count=1— passed, including the existing historical-consumer compatibility tests.golangci-lint run ./...— passed, zero issues.bufformat/lint andWIRE_JSONbreaking checks against upstream base — passed; generated kubelet bindings reproduce byte-for-byte with protoc 28.3 / protoc-gen-go 1.35.2.No live cluster rollout or node restart was performed. Older consumers ignoring unknown fields is not sufficient for future flag removal; compatible consumer delivery remains a separate prerequisite.
Which issue(s) this PR fixes:
No linked issue. Additive prerequisite only; the actual flag migration is out of scope.