Skip to content

Conversation

@awesomenix
Copy link
Contributor

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 #

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedFeb 3, 2026, 11:38 PM

@awesomenix awesomenix changed the title Nishp/use/kubecmdflags fix: deprecate kubelet_flags in favour of kubelet_cmd_flags Feb 3, 2026
Copy link
Contributor

Copilot AI left a 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_flags and kubelet_node_labels map fields in protobuf schema
  • Added new kubelet_cmd_flags and kubelet_cmd_node_labels string fields
  • Updated e2e tests to use string concatenation instead of map manipulation
  • Removed baseKubeletConfig function 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

Copy link
Contributor

Copilot AI left a 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.

@awesomenix awesomenix force-pushed the nishp/use/kubecmdflags branch from 36970b0 to ebd6f82 Compare February 3, 2026 23:37
// 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() != "" {
Copy link
Contributor

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?

@awesomenix
Copy link
Contributor Author

this is going backwards to client providing everything like before, instead of relying to structured input. I am abandoning this

@awesomenix awesomenix closed this Feb 4, 2026
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.

4 participants