Add CPU Manager related configs (backport #756) #822
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
system-reserved
andkube-reserved
, both of which follow GKE CPU reservation formula for calculating reserved CPU resources.rke2-99-z01-harvester-cpu-manager.yaml
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 bein
99-z01-harvester-cpu-manager.yaml
. The content should beThis is an automatic backport of pull request #756 done by [Mergify](https://mergify.com).