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
name: telegraf
version: 1.7.38
appVersion: 1.18.0
version: 1.8.0
appVersion: 1.18.3
deprecated: false
description: Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.
keywords:
......
......@@ -41,6 +41,11 @@ spec:
{{- end }}
env:
{{ toYaml .Values.env | indent 8 }}
{{- if .Values.envFromSecret }}
envFrom:
- secretRef:
name: {{ .Values.envFromSecret . }}
{{- end }}
volumeMounts:
- name: config
mountPath: /etc/telegraf
......
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
{{- if .Values.rbac.clusterWide }}
kind: ClusterRole
{{- else }}
......@@ -12,4 +12,4 @@ metadata:
{{- include "telegraf.labels" . | nindent 4 }}
rules:
{{ toYaml .Values.rbac.rules | indent 2 }}
{{- end }}
\ No newline at end of file
{{- end }}
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
{{- if .Values.rbac.clusterWide }}
kind: ClusterRoleBinding
{{- else }}
......@@ -21,4 +21,4 @@ roleRef:
kind: Role
{{- end }}
name: {{ template "telegraf.fullname" . }}
{{- end }}
\ No newline at end of file
{{- end }}
......@@ -18,6 +18,14 @@ imagePullSecrets: []
## Configure args passed to Telegraf containers
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:
- name: HOSTNAME
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