Skip to content

Commit

Permalink
Trusty: Update heapster manifest handling code
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Zheng committed Mar 24, 2016
1 parent f89432e commit bfd68b3
Showing 1 changed file with 6 additions and 2 deletions.
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

1 comment on commit bfd68b3

@k8s-teamcity-mesosphere

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity OSS :: Kubernetes Mesos :: 4 - Smoke Tests Build 19871 outcome was SUCCESS
Summary: Tests passed: 1, ignored: 267 Build time: 00:09:59

Please sign in to comment.