Drop docker label from fluentd meta if docker is not presented
Change-Id: Ia870e51b8cccdcf0c46e1b60ee887ddc3dbaa907
Related-PROD: PROD-25933 (PROD:25933)
diff --git a/kubernetes/meta/fluentd.yml b/kubernetes/meta/fluentd.yml
index 3a38245..623fcea 100644
--- a/kubernetes/meta/fluentd.yml
+++ b/kubernetes/meta/fluentd.yml
@@ -16,6 +16,7 @@
deb: ['td-agent-additional-plugins']
config:
label:
+ {%- if pillar.docker is defined %}
docker:
filter:
add_drop_tag:
@@ -25,6 +26,7 @@
record:
- name: drop_event
value: ${ record.fetch('attrs', {}).fetch('io.kubernetes.pod.name', '') }
+ {%- endif %}
kubernetes:
input:
container: