From d81965205241e90c2271a3948e80e0465648cdbe Mon Sep 17 00:00:00 2001 From: Julian Vassev Date: Thu, 5 Jul 2018 04:43:20 -0700 Subject: [PATCH] Follow best practices for metadata plugin As discussed in #16, it's recommended to set an env var K8S_NODE_NAME: https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter#environment-variables-for-kubernetes --- log-router/Chart.yaml | 2 +- log-router/templates/daemonset.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/log-router/Chart.yaml b/log-router/Chart.yaml index 7db60149..899b4e77 100644 --- a/log-router/Chart.yaml +++ b/log-router/Chart.yaml @@ -4,4 +4,4 @@ apiVersion: v1 description: Distribution of Fluentd as K8S daemonset name: log-router -version: 0.2.1 +version: 0.2.2 diff --git a/log-router/templates/daemonset.yaml b/log-router/templates/daemonset.yaml index 013dbeed..c2cfa0d6 100644 --- a/log-router/templates/daemonset.yaml +++ b/log-router/templates/daemonset.yaml @@ -26,6 +26,11 @@ spec: containers: - name: fluentd image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + env: + - name: K8S_NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName imagePullPolicy: {{ .Values.image.pullPolicy }} volumeMounts: - name: fluentconf