Make heapster config creation dynamic

This commit is contained in:
Brendan Burns
2015-10-21 13:11:43 -07:00
parent b02b5b9f87
commit 90d9e6e935
9 changed files with 34 additions and 5 deletions

View File

@@ -1,3 +1,8 @@
{% set heapster_memory = "300Mi" -%}
{% if pillar['num_nodes'] is defined -%}
{% set heapster_memory = (200 + pillar['num_nodes'] * 12)|string + "Mi" -%}
{% endif -%}
apiVersion: v1
kind: ReplicationController
metadata:
@@ -25,7 +30,7 @@ spec:
resources:
limits:
cpu: 100m
memory: 300Mi
memory: {{ heapster_memory }}
command:
- /heapster
- --source=kubernetes:''