Check that num_nodes is both defined and not None, not just defined

This commit is contained in:
Brendan Burns 2016-01-12 07:20:35 -08:00
parent 5b43a12775
commit 9c843495d7
4 changed files with 4 additions and 4 deletions

View File

@ -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 -%}

View File

@ -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 -%}

View File

@ -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 -%}

View File

@ -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 -%}