Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[common]: add envfrom #115

Merged
merged 4 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 7 additions & 1 deletion charts/common/templates/_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,14 @@
subPath: {{ $key }}
{{- end }}
{{- end }}
{{- if or $containerValues.envSecret $containerValues.envConfigMap $controllerValues.envSecret $controllerValues.envConfigMap }}
{{- if or $containerValues.envFrom $controllerValues.envFrom $containerValues.envSecret $containerValues.envConfigMap $controllerValues.envSecret $controllerValues.envConfigMap }}
envFrom:
{{- with $containerValues.envFrom }}
{{- toYaml . | nidnent 4 }}
{{- end }}
{{- with $controllerValues.envFrom }}
{{- toYaml . | nidnent 4 }}
{{- end }}
{{- if $controllerValues.envSecret }}
- secretRef:
name: {{ template "library.name" $root }}-{{ $componentName }}
Expand Down
6 changes: 6 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 Expand Up @@ -785,6 +788,9 @@
"envConfigMap": {
"type": "object"
},
"envFrom": {
"type": ["array"]
},
"replicas": {
"type": "integer",
"default": 1
Expand Down
14 changes: 14 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 Expand Up @@ -511,6 +518,13 @@ components:
# envConfigMap is a dictionary of environment variables set for the current container, key: value
# envConfigMap: {}

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

# configFilesDefaultMode sets permissions for all configFiles mounted.
# See 'pod.spec.volumes.configMap.defaultMode' or 'pod.spec.volumes.secret.defaultMode' for more information
# Comment out for using default (0644)
Expand Down
Loading