From 9c843495d79b7db8e95dc71af7d003700a39deb9 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Tue, 12 Jan 2016 07:20:35 -0800 Subject: [PATCH] Check that num_nodes is both defined and not None, not just defined --- .../addons/cluster-monitoring/google/heapster-controller.yaml | 2 +- .../googleinfluxdb/heapster-controller-combined.yaml | 2 +- .../addons/cluster-monitoring/influxdb/heapster-controller.yaml | 2 +- .../cluster-monitoring/standalone/heapster-controller.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cluster/addons/cluster-monitoring/google/heapster-controller.yaml b/cluster/addons/cluster-monitoring/google/heapster-controller.yaml index 360b8a5905a..72328515947 100644 --- a/cluster/addons/cluster-monitoring/google/heapster-controller.yaml +++ b/cluster/addons/cluster-monitoring/google/heapster-controller.yaml @@ -1,5 +1,5 @@ {% set heapster_memory = "300Mi" -%} -{% if pillar['num_nodes'] is defined -%} +{% if pillar['num_nodes'] is defined and pillar['num_nodes'] is not None -%} {% set heapster_memory = (200 + pillar['num_nodes'] * 12)|string + "Mi" -%} {% endif -%} diff --git a/cluster/addons/cluster-monitoring/googleinfluxdb/heapster-controller-combined.yaml b/cluster/addons/cluster-monitoring/googleinfluxdb/heapster-controller-combined.yaml index 57b6b3ee1c0..9fe2bd1c921 100644 --- a/cluster/addons/cluster-monitoring/googleinfluxdb/heapster-controller-combined.yaml +++ b/cluster/addons/cluster-monitoring/googleinfluxdb/heapster-controller-combined.yaml @@ -1,5 +1,5 @@ {% set heapster_memory = "300Mi" -%} -{% if pillar['num_nodes'] is defined -%} +{% if pillar['num_nodes'] is defined and pillar['num_nodes'] is not None -%} {% set heapster_memory = (200 + pillar['num_nodes'] * 12)|string + "Mi" -%} {% endif -%} diff --git a/cluster/addons/cluster-monitoring/influxdb/heapster-controller.yaml b/cluster/addons/cluster-monitoring/influxdb/heapster-controller.yaml index f2639da0d71..09c24c4a87a 100644 --- a/cluster/addons/cluster-monitoring/influxdb/heapster-controller.yaml +++ b/cluster/addons/cluster-monitoring/influxdb/heapster-controller.yaml @@ -1,5 +1,5 @@ {% set heapster_memory = "300Mi" -%} -{% if pillar['num_nodes'] is defined -%} +{% if pillar['num_nodes'] is defined and pillar['num_nodes'] is not None -%} {% set heapster_memory = (200 + pillar['num_nodes'] * 12)|string + "Mi" -%} {% endif -%} diff --git a/cluster/addons/cluster-monitoring/standalone/heapster-controller.yaml b/cluster/addons/cluster-monitoring/standalone/heapster-controller.yaml index 6b6530ee19d..7d19e263f80 100644 --- a/cluster/addons/cluster-monitoring/standalone/heapster-controller.yaml +++ b/cluster/addons/cluster-monitoring/standalone/heapster-controller.yaml @@ -1,5 +1,5 @@ {% set heapster_memory = "300Mi" -%} -{% if pillar['num_nodes'] is defined -%} +{% if pillar['num_nodes'] is defined and pillar['num_nodes'] is not None -%} {% set heapster_memory = (200 + pillar['num_nodes'] * 12)|string + "Mi" -%} {% endif -%}