From 39bb6d3777bf3f3afea61ac27e8f6f061e593d86 Mon Sep 17 00:00:00 2001 From: Abhishek Shah Date: Thu, 2 Apr 2015 17:21:13 -0700 Subject: [PATCH] Enable log collection from master. --- cluster/saltbase/salt/top.sls | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/cluster/saltbase/salt/top.sls b/cluster/saltbase/salt/top.sls index c6d5bf215210e..b950d09fa751d 100644 --- a/cluster/saltbase/salt/top.sls +++ b/cluster/saltbase/salt/top.sls @@ -14,11 +14,10 @@ base: - cadvisor - kubelet - kube-proxy -{% if pillar.get('enable_node_logging', '').lower() == 'true' %} - {% if pillar['logging_destination'] is defined and pillar['logging_destination'] == 'elasticsearch' %} +{% if pillar.get('enable_node_logging', '').lower() == 'true' and pillar['logging_destination'] is defined %} + {% if pillar['logging_destination'] == 'elasticsearch' %} - fluentd-es - {% endif %} - {% if pillar['logging_destination'] is defined and pillar['logging_destination'] == 'gcp' %} + {% elif pillar['logging_destination'] == 'gcp' %} - fluentd-gcp {% endif %} {% endif %} @@ -57,6 +56,13 @@ base: - kubelet {% endif %} +{% if pillar.get('enable_node_logging', '').lower() == 'true' and pillar['logging_destination'] is defined %} + {% if pillar['logging_destination'] == 'elasticsearch' %} + - fluentd-es + {% elif pillar['logging_destination'] == 'gcp' %} + - fluentd-gcp + {% endif %} +{% endif %} 'roles:kubernetes-pool-vsphere': - match: grain