Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 2, 2026

Addresses documentation feedback from #7771 for the new kubelet_cmd_flags field that enables deprecation of the map-based kubelet_flags.

Changes

  • Function documentation: Added comment to getKubeletFlags() explaining precedence behavior—when kubelet_cmd_flags is present, it's returned as-is; otherwise falls back to sorted key-value pairs from kubelet_flags map

  • Proto README: Updated KubeletConfig section documenting that KubeletCmdFlags accepts pre-formatted string flags and takes precedence over KubeletFlags

// getKubeletFlags returns the kubelet command-line flags as a string.
// When kubelet_cmd_flags is present, it takes precedence and is returned as-is (raw string).
// Otherwise, it falls back to constructing flags from the kubelet_flags map (sorted key-value pairs).
func getKubeletFlags(kubeletConfig *aksnodeconfigv1.KubeletConfig) string {
	if kubeletConfig.GetKubeletCmdFlags() != "" {
		return kubeletConfig.GetKubeletCmdFlags()
	}
	return createSortedKeyValuePairs(kubeletConfig.GetKubeletFlags(), " ")
}

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…gs function

Co-authored-by: awesomenix <1703110+awesomenix@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on kubelet_cmd_flags field implementation docs: document kubelet_cmd_flags field and precedence behavior Feb 2, 2026
@awesomenix awesomenix marked this pull request as ready for review February 2, 2026 23:43
@awesomenix awesomenix merged commit 675d3e3 into nishp/use/kubecmdflags Feb 2, 2026
6 checks passed
@awesomenix awesomenix deleted the copilot/sub-pr-7771 branch February 2, 2026 23:43
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.

2 participants