Skip to content

Add k8s settings: prefer-closest-numa-nodes and max-allowable-numa-nodes#117

Merged
piyush-jena merged 4 commits intobottlerocket-os:developfrom
piyush-jena:add-k8s-settings
Apr 1, 2026
Merged

Add k8s settings: prefer-closest-numa-nodes and max-allowable-numa-nodes#117
piyush-jena merged 4 commits intobottlerocket-os:developfrom
piyush-jena:add-k8s-settings

Conversation

@piyush-jena
Copy link
Copy Markdown
Contributor

@piyush-jena piyush-jena commented Mar 3, 2026

Issue # bottlerocket-os/bottlerocket#4750

Related to:

Description of changes:
Add 2 topology manager policy options:

  1. max-allowable-numa-nodes - GA k8s-1.35+
  2. prefer-closest-numa-nodes - GA k8s-1.32+

Testing details available in bottlerocket-os/bottlerocket-core-kit#848

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@mgsharm
Copy link
Copy Markdown
Contributor

mgsharm commented Mar 23, 2026

Can you add sign-off in the commit.

cpu_manager_policy_options: Vec<KubernetesCPUManagerPolicyOption>,
topology_manager_scope: TopologyManagerScope,
topology_manager_policy: TopologyManagerPolicy,
topology_manager_policy_options: KubernetesTopologyManagerPolicyOptions,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be TopologyManagerPolicyOptions? The sibling types TopologyManagerScope and TopologyManagerPolicy don't have the Kubernetes prefix, and the parent struct already establishes the Kubernetes context.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The more closer equivalent setting is the cpu_manager_policy_options of type Vec<KubernetesCPUManagerPolicyOption>. Maybe that's why AI generated it this way but your comment definitely applies to KubernetesMaxAllowableNumaNodesValue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After going through other settings it seems like Kubernetes prefix is used in other types as well and seems to be the appropriate one here as described above. However, there is no good resource that tells us when this should be used. But I think setting types seem to have the prefix and the underlying settings don't in most cases.

Comment thread bottlerocket-settings-models/CHANGELOG.md

/// KubernetesTopologyManagerPolicyOptions represents the topology manager policy options
/// for the kubelet. These are rendered as `topologyManagerPolicyOptions` in KubeletConfiguration.
/// Upstream source: https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/cm/topologymanager/policy_options.go
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: can we use a permanent link here?

Comment thread bottlerocket-settings-models/modeled-types/src/kubernetes.rs
Comment thread bottlerocket-settings-models/modeled-types/src/kubernetes.rs Outdated
Comment thread bottlerocket-settings-models/modeled-types/src/kubernetes.rs
Comment thread bottlerocket-settings-models/modeled-types/src/kubernetes.rs Outdated
Signed-off-by: Piyush Jena <jepiyush@amazon.com>
Signed-off-by: Piyush Jena <jepiyush@amazon.com>
@piyush-jena piyush-jena force-pushed the add-k8s-settings branch 2 times, most recently from fd281d7 to 635254c Compare March 25, 2026 01:48
Signed-off-by: Piyush Jena <jepiyush@amazon.com>
Comment thread bottlerocket-settings-models/CHANGELOG.md Outdated
Signed-off-by: Piyush Jena <jepiyush@amazon.com>
@piyush-jena
Copy link
Copy Markdown
Contributor Author

force push addresses @arnaldo2792 's suggestion.

@piyush-jena piyush-jena merged commit 1357b06 into bottlerocket-os:develop Apr 1, 2026
2 checks passed
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