Skip to content

Commit d819652

Browse files
committed
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
1 parent 58d1869 commit d819652

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

log-router/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
apiVersion: v1
55
description: Distribution of Fluentd as K8S daemonset
66
name: log-router
7-
version: 0.2.1
7+
version: 0.2.2

log-router/templates/daemonset.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ spec:
2626
containers:
2727
- name: fluentd
2828
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
29+
env:
30+
- name: K8S_NODE_NAME
31+
valueFrom:
32+
fieldRef:
33+
fieldPath: spec.nodeName
2934
imagePullPolicy: {{ .Values.image.pullPolicy }}
3035
volumeMounts:
3136
- name: fluentconf

0 commit comments

Comments
 (0)