From 5b14b6c162708b5fec79be232f32f430ab1f2884 Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Wed, 4 Sep 2019 09:48:19 -0500 Subject: [PATCH] Fluentd: Add support for arbitrary environment vars This updates the Fluentd deployment template to use the helm toolkit util for generating environment variables through the chart's values.yaml. This adds flexibility in defining fluentd outputs, as arbitrary environment variables can be injected and consumed in fluentd's filters and outputs Change-Id: I72a2c476378cc555bde1387781b4a06f13b51bc6 Signed-off-by: Steve Wilkerson --- fluentd/templates/deployment-fluentd.yaml | 3 +++ fluentd/values.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/fluentd/templates/deployment-fluentd.yaml b/fluentd/templates/deployment-fluentd.yaml index 10270e421..7896c0fb6 100644 --- a/fluentd/templates/deployment-fluentd.yaml +++ b/fluentd/templates/deployment-fluentd.yaml @@ -161,6 +161,9 @@ spec: value: {{ tuple "elasticsearch" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }} - name: KAFKA_BROKER value: {{ $kafkaBrokerURI }} +{{- if .Values.pod.env.fluentd }} +{{ include "helm-toolkit.utils.to_k8s_env_vars" .Values.pod.env.fluentd | indent 12 }} +{{- end }} - name: ELASTICSEARCH_USERNAME valueFrom: secretKeyRef: diff --git a/fluentd/values.yaml b/fluentd/values.yaml index 1725057c1..1c2a615a9 100644 --- a/fluentd/values.yaml +++ b/fluentd/values.yaml @@ -405,6 +405,8 @@ network_policy: - {} pod: + env: + fluentd: null tolerations: fluentd: enabled: false