fix(kubelet): remove streamingConnectionIdleTimeout for k8s >= 1.34#8812
fix(kubelet): remove streamingConnectionIdleTimeout for k8s >= 1.34#8812abigailliang-aks-sig-node wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent streamingConnectionIdleTimeout from being propagated to kubelet for Kubernetes >= 1.34, where the corresponding KubeletConfiguration field/flag has been removed, by stripping it from kubelet CLI flags and clearing it from the kubelet config-file content.
Changes:
- Delete
--streaming-connection-idle-timeoutfrom kubelet flags for Kubernetes >= 1.34 in both the legacy NodeBootstrappingConfiguration path and the aks-node-controller helper path. - Clear
KubeletConfigFileConfig.StreamingConnectionIdleTimeoutfor Kubernetes >= 1.34 before marshaling kubelet config-file JSON in aks-node-controller. - Add version gating comments explaining why the field must not appear for 1.34+.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/agent/baker.go | Removes --streaming-connection-idle-timeout from kubelet flags for k8s >= 1.34 in the NodeBootstrappingConfiguration validation path. |
| aks-node-controller/parser/parser.go | Clears StreamingConnectionIdleTimeout before kubelet config-file JSON marshaling for k8s >= 1.34. |
| aks-node-controller/helpers/utils.go | Removes --streaming-connection-idle-timeout from kubelet flags for k8s >= 1.34 in helper validation. |
| ImageGcHighThresholdPercent: to.Ptr(int32(90)), | ||
| ImageGcLowThresholdPercent: to.Ptr(int32(70)), | ||
| CgroupsPerQos: to.Ptr(true), | ||
| CpuManagerPolicy: "static", |
There was a problem hiding this comment.
this change block due to gofmt/goimports column alignment.
When a struct literal contains multiple fields, gofmt attempts to align the values following the colons into the same column. The width of the aligned column is determined by the longest field name in the group:
| // nested | ||
| "--client-ca-file": "/etc/kubernetes/certs/ca.crt", | ||
| "--authentication-token-webhook": "true", | ||
| "--authorization-mode": "Webhook", |
There was a problem hiding this comment.
same gofmt behave
|
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
917e68a to
7ad9f47
Compare
2075fc1 to
c2dd0bb
Compare
streamingConnectionIdleTimeout was removed from KubeletConfiguration in k8s 1.34. This ensures it does not appear on the command line or in the config file for those versions. Changes: - Delete --streaming-connection-idle-timeout from KubeletFlags in baker (Linux + Windows) - Filter deprecated flags from CustomConfiguration output path without mutating RP data - Add getDeprecatedKubeletFlags util for version-gated flag filtering - Clear the flag in aks-node-controller parser (scriptless path) - Mark proto field and Go struct field as deprecated - Regenerate kubelet_config.pb.go via make proto-generate - Add comprehensive unit tests covering version gating, final command line output, custom configuration path, and non-reintroduction - Add e2e test removing streaming-connection-idle-timeout from NBC template
…ection-idle-timeout
cd3803e to
95936ac
Compare
AgentBaker Linux gate detectiveRun: https://msazure.visualstudio.com/CloudNativeCompute/_build/results?buildId=172264217 TL;DR: Ubuntu 24.04 Gen2 E2E package validation reached the node and then failed because expected moby-containerd 2.3.2-ubuntu24.04u1 was missing from installed packages. Likely cause/signature: deterministic VHD/package-content or expectation skew ($e2eSig). Confidence: High. Recommended owner/action: VHD/package owner should compare Ubuntu 24.04 package feed/build inputs against installed package inventory and either fix the package source/image content or correct expected metadata. Strongest alternative: test expectation advanced before package/feed availability; less likely to be PR-change-caused because PR #8812 changes kubelet streaming idle timeout logic, not containerd packaging. Evidence: E2E est-log.json reports the package assertion; sibling Ubuntu 24.04 Gen2 leaves show the same signature; retry evidence is deterministic rather than transient. Wiki signature: ubuntu2404-gen2-moby-containerd-232-ubuntu2404u1-missing |
…ection-idle-timeout
fix at #8959 |
| // streamingConnectionIdleTimeout was removed from Kube | ||
| // letConfiguration in k8s 1.34+. | ||
| // It must not appear on the command line or in the config file for those versions. |
Detective summaryRun: https://msazure.visualstudio.com/CloudNativeCompute/_build/results?buildId=172411891 Failed job/stage/task: TL;DR: the gate failed before image provisioning because ARM validation hit Likely cause / signature
Recommended owner / actionNode Lifecycle / VHD gate infra owner: increase Evidence
|
…ection-idle-timeout # Conflicts: # aks-node-controller/parser/parser.go
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- aks-node-controller/pkg/gen/aksnodeconfig/v1/kubelet_config.pb.go: Generated file
Comments suppressed due to low confidence (2)
pkg/agent/utils.go:424
- This comment is misleading: the function still mutates the caller's custom config by merging in missing default flags (see the loop just above). Suggest rewording to clarify that only deprecated-flag removal is avoided, not all mutation.
// Filter out deprecated flags at output time rather than mutating the caller's CustomConfiguration.
aks-node-controller/helpers/utils.go:235
- The word "KubeletConfiguration" is broken across two comment lines ("Kube" / "letConfiguration"), which reads like a typo in rendered docs and makes grepping harder. Rewrap the comment without splitting the identifier.
// streamingConnectionIdleTimeout was removed from Kube
// letConfiguration in k8s 1.34+.
// It must not appear on the command line or in the config file for those versions.
Summary
Remove
streamingConnectionIdleTimeoutfrom both the kubelet command line and the kubelet config file for Kubernetes >= 1.34, where this field was removed fromKubeletConfiguration.Context: RP-side flow (scriptless path)
RP already handles this in
removeKubeletFlags(). However, the field may still arrive inKubeletConfigFileConfigfrom:GetAKSNodeConfig(NBC conversion) path where the removal may not be appliedChanges (defense-in-depth)
aks-node-controller/helpers/utils.goValidateAndSetLinuxKubeletFlags(): delete--streaming-connection-idle-timeoutfor >= 1.34aks-node-controller/parser/parser.gogetCSEEnv(): clearKubeletConfigFileConfig.StreamingConnectionIdleTimeoutfor >= 1.34 before marshalingpkg/agent/baker.goValidateAndSetLinuxNodeBootstrappingConfiguration(): same flag deletion for the old NBC pathWhy both flag deletion AND config file clearing?
helpers/utils.go,baker.go): coversenableKCF=falsecase where translated flags stay on the command lineparser.go): coversenableKCF=truecase where the field would appear inkubeletconfig.jsonif RP sets itTest plan