mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #23005 from andyzheng0831/fix
Auto commit by PR queue bot
This commit is contained in:
commit
8313504728
@ -711,9 +711,12 @@ prepare_kube_addons() {
|
|||||||
file_dir="cluster-monitoring/${ENABLE_CLUSTER_MONITORING}"
|
file_dir="cluster-monitoring/${ENABLE_CLUSTER_MONITORING}"
|
||||||
setup_addon_manifests "addons" "${file_dir}"
|
setup_addon_manifests "addons" "${file_dir}"
|
||||||
# Replace the salt configurations with variable values.
|
# Replace the salt configurations with variable values.
|
||||||
heapster_memory="200Mi"
|
metrics_memory="200Mi"
|
||||||
if [ -n "${NUM_NODES:-}" ] && [ "${NUM_NODES}" -gt 1 ]; then
|
eventer_memory="200Mi"
|
||||||
heapster_memory="$((${NUM_NODES} * 3 + 200))Mi"
|
if [ -n "${NUM_NODES:-}" ] && [ "${NUM_NODES}" -ge 1 ]; then
|
||||||
|
num_kube_nodes="$((${NUM_NODES}-1))"
|
||||||
|
metrics_memory="$((${num_kube_nodes} * 4 + 200))Mi"
|
||||||
|
eventer_memory="$((${num_kube_nodes} * 500 + 200 * 1024))Ki"
|
||||||
fi
|
fi
|
||||||
controller_yaml="${addon_dst_dir}/${file_dir}"
|
controller_yaml="${addon_dst_dir}/${file_dir}"
|
||||||
if [ "${ENABLE_CLUSTER_MONITORING:-}" = "googleinfluxdb" ]; then
|
if [ "${ENABLE_CLUSTER_MONITORING:-}" = "googleinfluxdb" ]; then
|
||||||
@ -722,7 +725,8 @@ prepare_kube_addons() {
|
|||||||
controller_yaml="${controller_yaml}/heapster-controller.yaml"
|
controller_yaml="${controller_yaml}/heapster-controller.yaml"
|
||||||
fi
|
fi
|
||||||
remove_salt_config_comments "${controller_yaml}"
|
remove_salt_config_comments "${controller_yaml}"
|
||||||
sed -i -e "s@{{ *heapster_memory *}}@${heapster_memory}@g" "${controller_yaml}"
|
sed -i -e "s@{{ *metrics_memory *}}@${metrics_memory}@g" "${controller_yaml}"
|
||||||
|
sed -i -e "s@{{ *eventer_memory *}}@${eventer_memory}@g" "${controller_yaml}"
|
||||||
fi
|
fi
|
||||||
cp "${addon_src_dir}/namespace.yaml" "${addon_dst_dir}"
|
cp "${addon_src_dir}/namespace.yaml" "${addon_dst_dir}"
|
||||||
if [ "${ENABLE_L7_LOADBALANCING:-}" = "glbc" ]; then
|
if [ "${ENABLE_L7_LOADBALANCING:-}" = "glbc" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user