Skip to content
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

Add CPU Manager related configs (backport #756) #822

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Aug 23, 2024

Problem:
This is a prerequisite pr for implementing CPU Pinning. We need to add the cpu manager configs first. system-reserved, kube-reserved, cpu-manager-policy.

Solution:
Introduced two configs files:

  • rke2-99-z00-harvester-reserved-resources.yaml
    • include two configssystem-reserved and kube-reserved, both of which follow GKE CPU reservation formula for calculating reserved CPU resources.
  • rke2-99-z01-harvester-cpu-manager.yaml
    • include cpu manager policy setting, currently the value is "none" (which is the default value)

Note

Here I add these files instead of adding configs in 90-harvester-server.yaml or 90-harvester-worker.yaml since we will have 99-max-pods.yaml (after upgrade to a newer harvester version) which overrides kubelet args to "max-pods=200".
https://github.com/harvester/harvester/blob/226f72aa58532071232ad548e27970c1cec55733/package/upgrade/upgrade_node.sh#L490-L495

Related Issue:
related to harvester/harvester#2305
HEP: harvester/harvester#5803

Test Plan:
Setup harvester with one node which has 8 CPUs and check if the two config files exist under /etc/rancher/rke2/config.yaml.d/ and have correct settings.
in 99-z00-harvester-reserved-resources.yaml. The content should be

kubelet-arg+:
- "system-reserved=cpu=490m"
- "kube-reserved=cpu=490m"

in 99-z01-harvester-cpu-manager.yaml. The content should be

kubelet-arg+:
- "cpu-manager-policy=none"

This is an automatic backport of pull request #756 done by [Mergify](https://mergify.com).

Add new config file:
- rke2-99-z00-harvester-reserved-resources.yaml:
  which includes system-reserved and kube-reserved CPU resources,
  kube-reserved follow the GKE CPU reservation formula for calculating
  reserved CPU resources, and system-reserved is 2/3 kube-reserved cpu
  resource.

Signed-off-by: Cooper Tseng <cooper.tseng@suse.com>
(cherry picked from commit 6642d40)
Signed-off-by: Cooper Tseng <cooper.tseng@suse.com>
(cherry picked from commit 7940f0d)
@brandboat brandboat merged commit bd17e23 into v1.4 Aug 23, 2024
7 checks passed
@brandboat brandboat deleted the mergify/bp/v1.4/pr-756 branch August 23, 2024 11:38
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.

3 participants