mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Make CPU request for heapster in kubemark scale with the number of Nodes
This commit is contained in:
parent
5dd56c9b1e
commit
27fc7be396
@ -36,7 +36,7 @@
|
||||
"image": "gcr.io/google_containers/heapster:v1.3.0",
|
||||
"resources": {
|
||||
"requests": {
|
||||
"cpu": "100m",
|
||||
"cpu": "{{METRICS_CPU}}m",
|
||||
"memory": "{{METRICS_MEM}}Mi"
|
||||
}
|
||||
},
|
||||
@ -58,7 +58,6 @@
|
||||
"image": "gcr.io/google_containers/heapster:v1.3.0",
|
||||
"resources": {
|
||||
"requests": {
|
||||
"cpu": "100m",
|
||||
"memory": "{{EVENTER_MEM}}Ki"
|
||||
}
|
||||
},
|
||||
|
@ -302,6 +302,10 @@ current-context: kubemark-context")
|
||||
metrics_mem_per_node=4
|
||||
metrics_mem=$((200 + ${metrics_mem_per_node}*${NUM_NODES:-10}))
|
||||
sed -i'' -e "s/{{METRICS_MEM}}/${metrics_mem}/g" "${RESOURCE_DIRECTORY}/addons/heapster.json"
|
||||
metrics_cpu_per_node_numerator=${NUM_NODES:-10}
|
||||
metrics_cpu_per_node_denumerator=2
|
||||
metrics_cpu=$((80 + metrics_cpu_per_node_numerator / metrics_cpu_per_node_denumerator))
|
||||
sed -i'' -e "s/{{METRICS_CPU}}/${metrics_cpu}/g" "${RESOURCE_DIRECTORY}/addons/heapster.json"
|
||||
eventer_mem_per_node=500
|
||||
eventer_mem=$((200 * 1024 + ${eventer_mem_per_node}*${NUM_NODES:-10}))
|
||||
sed -i'' -e "s/{{EVENTER_MEM}}/${eventer_mem}/g" "${RESOURCE_DIRECTORY}/addons/heapster.json"
|
||||
|
Loading…
Reference in New Issue
Block a user