Unverified Commit 0b7a0a1c authored by Yurii Matsiuk's avatar Yurii Matsiuk Committed by GitHub

[telegraf] Add envFromSecret to pass sensitive data into environment (#285)

* [telegraf] Add envFromSecret to pass sensitive data into environment Signed-off-by: 's avatarYurii Matsiuk <ymatsiuk@users.noreply.github.com> * [telegraf] Fix deprecation errors * Update Chart.yaml Co-authored-by: 's avatarYurii Matsiuk <ymatsiuk@users.noreply.github.com> Co-authored-by: 's avatartimhallinflux <timhallinflux@users.noreply.github.com>
parent 03216f66
apiVersion: v2 apiVersion: v2
name: telegraf name: telegraf
version: 1.7.38 version: 1.8.0
appVersion: 1.18.0 appVersion: 1.18.3
deprecated: false deprecated: false
description: Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics. description: Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.
keywords: keywords:
......
...@@ -41,6 +41,11 @@ spec: ...@@ -41,6 +41,11 @@ spec:
{{- end }} {{- end }}
env: env:
{{ toYaml .Values.env | indent 8 }} {{ toYaml .Values.env | indent 8 }}
{{- if .Values.envFromSecret }}
envFrom:
- secretRef:
name: {{ .Values.envFromSecret . }}
{{- end }}
volumeMounts: volumeMounts:
- name: config - name: config
mountPath: /etc/telegraf mountPath: /etc/telegraf
......
{{- if .Values.rbac.create }} {{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1
{{- if .Values.rbac.clusterWide }} {{- if .Values.rbac.clusterWide }}
kind: ClusterRole kind: ClusterRole
{{- else }} {{- else }}
......
{{- if .Values.rbac.create }} {{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1
{{- if .Values.rbac.clusterWide }} {{- if .Values.rbac.clusterWide }}
kind: ClusterRoleBinding kind: ClusterRoleBinding
{{- else }} {{- else }}
......
...@@ -18,6 +18,14 @@ imagePullSecrets: [] ...@@ -18,6 +18,14 @@ imagePullSecrets: []
## Configure args passed to Telegraf containers ## Configure args passed to Telegraf containers
args: [] args: []
# The name of a secret in the same kubernetes namespace which contains values to
# be added to the environment (must be manually created)
# This can be useful for auth tokens, etc.
# envFromSecret: "telegraf-tokens"
env: env:
- name: HOSTNAME - name: HOSTNAME
value: "telegraf-polling-service" value: "telegraf-polling-service"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment