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

Trusty: Update heapster manifest handling code #23434

Merged
merged 1 commit into from
Mar 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions cluster/gce/trusty/configure-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -605,10 +605,12 @@ prepare_kube_addons() {
# Replace the salt configurations with variable values.
metrics_memory="200Mi"
eventer_memory="200Mi"
readonly metrics_memory_per_node="4"
readonly eventer_memory_per_node="500"
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"
metrics_memory="$((${num_kube_nodes} * ${metrics_memory_per_node} + 200))Mi"
eventer_memory="$((${num_kube_nodes} * ${eventer_memory_per_node} + 200 * 1024))Ki"
fi
controller_yaml="${addon_dst_dir}/${file_dir}"
if [ "${ENABLE_CLUSTER_MONITORING:-}" = "googleinfluxdb" ]; then
Expand All @@ -619,6 +621,8 @@ prepare_kube_addons() {
remove_salt_config_comments "${controller_yaml}"
sed -i -e "s@{{ *metrics_memory *}}@${metrics_memory}@g" "${controller_yaml}"
sed -i -e "s@{{ *eventer_memory *}}@${eventer_memory}@g" "${controller_yaml}"
sed -i -e "s@{{ *metrics_memory_per_node *}}@${metrics_memory_per_node}@g" "${controller_yaml}"
sed -i -e "s@{{ *eventer_memory_per_node *}}@${eventer_memory_per_node}@g" "${controller_yaml}"
fi
cp "${addon_src_dir}/namespace.yaml" "${addon_dst_dir}"
if [ "${ENABLE_L7_LOADBALANCING:-}" = "glbc" ]; then
Expand Down