-
Notifications
You must be signed in to change notification settings - Fork 245
fix: deprecate kubelet_flags in favour of kubelet_cmd_flags #7779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d1fd6a5 to
513ff2d
Compare
|
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request simplifies kubelet configuration by transitioning from map-based flag manipulation to direct string-based flags. The PR deprecates the old kubelet_flags and kubelet_node_labels map fields in favor of new kubelet_cmd_flags and kubelet_cmd_node_labels string fields. This allows external components to provide pre-formatted flag strings without requiring the system to parse and manipulate them.
Changes:
- Deprecated
kubelet_flagsandkubelet_node_labelsmap fields in protobuf schema - Added new
kubelet_cmd_flagsandkubelet_cmd_node_labelsstring fields - Updated e2e tests to use string concatenation instead of map manipulation
- Removed
baseKubeletConfigfunction and simplified node config initialization - Added backward compatibility fallback logic in parser
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| aks-node-controller/proto/aksnodeconfig/v1/kubelet_config.proto | Deprecated old map fields, added new string fields with inaccurate comment |
| aks-node-controller/pkg/gen/aksnodeconfig/v1/kubelet_config.pb.go | Auto-generated protobuf code reflecting schema changes |
| e2e/scenario_test.go | Updated tests to use string concatenation (with critical delimiter bugs) |
| e2e/node_config.go | Removed baseKubeletConfig, simplified initialization using external component |
| aks-node-controller/parser/parser.go | Updated to use new helper function for node labels |
| aks-node-controller/parser/helper.go | Added getKubeletNodeLabels with backward compatibility |
| aks-node-controller/parser/parser_test.go | Updated test to use new string field |
| aks-node-controller/helpers/utils_test.go | Updated test expectations from map to string format |
aks-node-controller/proto/aksnodeconfig/v1/kubelet_config.proto
Outdated
Show resolved
Hide resolved
413604c to
36970b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
36970b0 to
ebd6f82
Compare
| // When kubelet_cmd_node_labels is present, it takes precedence and is returned as-is (raw string). | ||
| // Otherwise, it falls back to constructing flags from the kubelet_node_labels map (sorted key-value pairs). | ||
| func getKubeletNodeLabels(kubeletConfig *aksnodeconfigv1.KubeletConfig) string { | ||
| if kubeletConfig.GetKubeletCmdNodeLabels() != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the bootstrapper now specifies node labels within a dedicated proto field? - is this PR mainly to separate out node labels from kubelet flags?
|
this is going backwards to client providing everything like before, instead of relying to structured input. I am abandoning this |
What this PR does / why we need it:
We do some surgery in case when we pass in node flags, stop doing that and just return string from external component
deprecate old fields
Which issue(s) this PR fixes:
Fixes #