Skip to content

Commit

Permalink
Merge pull request #203 from Th0masL/add_extra_env_support
Browse files Browse the repository at this point in the history
Add envWithTpl variable
  • Loading branch information
stevehipwell authored Jan 7, 2022
2 parents feee810 + 1bb7f68 commit 78aa2e2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
6 changes: 3 additions & 3 deletions charts/fluent-bit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- logging
- fluent-bit
- fluentd
version: 0.19.16
version: 0.19.17
appVersion: 1.8.11
icon: https://fluentbit.io/assets/img/logo1-default.png
home: https://fluentbit.io/
Expand All @@ -22,5 +22,5 @@ maintainers:
email: [email protected]
annotations:
artifacthub.io/changes: |
- kind: changed
description: "Update Fluent Bit image to v1.8.11."
- kind: added
description: "New envWithTpl value to support using templatable strings in environment variables."
10 changes: 8 additions & 2 deletions charts/fluent-bit/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@ containers:
{{- end }}
image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.env }}
{{- if or .Values.env .Values.envWithTpl }}
env:
{{- toYaml .Values.env | nindent 6 }}
{{- with .Values.env }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- range $item := .Values.envWithTpl }}
- name: {{ $item.name }}
value: {{ tpl $item.value $ | quote }}
{{- end }}
{{- end }}
{{- if .Values.envFrom }}
envFrom:
Expand Down
11 changes: 11 additions & 0 deletions charts/fluent-bit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,17 @@ podLabels: {}
priorityClassName: ""

env: []
# - name: FOO
# value: "bar"

# The envWithTpl array below has the same usage as "env", but is using the tpl function to support templatable string.
# This can be useful when you want to pass dynamic values to the Chart using the helm argument "--set <variable>=<value>"
# https://helm.sh/docs/howto/charts_tips_and_tricks/#using-the-tpl-function
envWithTpl: []
# - name: FOO_2
# value: "{{ .Values.foo2 }}"
#
# foo2: bar2

envFrom: []

Expand Down

0 comments on commit 78aa2e2

Please sign in to comment.