Skip to content

Commit

Permalink
feat: add envFrom container arg
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbaehler committed Sep 18, 2023
1 parent 2ddda80 commit 02dc9da
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/common/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: common
description: "Bedag's common Helm chart to use for creating other Helm charts"
version: 10.6.1
version: 10.6.2
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
Expand All @@ -27,4 +27,4 @@ annotations:
artifacthub.io/prerelease: "false"
artifacthub.io/license: Apache-2.0
artifacthub.io/changes: |
- "[Added]: support for clusterIP field"
- "[Added]: support for envFrom"
2 changes: 1 addition & 1 deletion charts/common/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# common

![Version: 10.6.1](https://img.shields.io/badge/Version-10.6.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 10.6.2](https://img.shields.io/badge/Version-10.6.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Bedag's common Helm chart to use for creating other Helm charts

Expand Down
5 changes: 4 additions & 1 deletion charts/common/templates/_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@
subPath: {{ $key }}
{{- end }}
{{- end }}
{{- if or $containerValues.envSecret $containerValues.envConfigMap $controllerValues.envSecret $controllerValues.envConfigMap }}
{{- if or $containerValues.envFrom $containerValues.envSecret $containerValues.envConfigMap $controllerValues.envSecret $controllerValues.envConfigMap }}
envFrom:
{{- with $containerValues.envFrom }}
{{- toYaml . | nidnent 4 }}
{{- end }}
{{- if $controllerValues.envSecret }}
- secretRef:
name: {{ template "library.name" $root }}-{{ $componentName }}
Expand Down
3 changes: 3 additions & 0 deletions charts/common/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
"envSecret": {
"type": "object"
},
"envFrom": {
"type": ["array"]
},
"envConfigMap": {
"type": "object"
},
Expand Down
7 changes: 7 additions & 0 deletions charts/common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,13 @@ components:
# envConfigMap is a dictionary of environment variables set for every container in a pod, key: value
# envConfigMap: {}

# envFrom is a list of environment references
envFrom: []
# - secretRef:
# name: my-secret
# - configMapRef:
# name: my-configmap

# gatherMetrics is true: service get a label which triggers serviceMonitor to gather metrics
gatherMetrics: false

Expand Down

0 comments on commit 02dc9da

Please sign in to comment.