Skip to content

Commit

Permalink
extra configs (#75)
Browse files Browse the repository at this point in the history
* apps: allow mounting of arbigrary configmaps and secrets as envvars

* bump chart
  • Loading branch information
domdepasquale committed Apr 19, 2024
1 parent 384791f commit 948f825
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/application-core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 3.0.4
version: 3.1.0

maintainers:
- name: Dominic DePasquale
20 changes: 18 additions & 2 deletions charts/application-core/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
- {{ . }}
{{- end }}
{{- end }}
{{- if or .Values.externalSecret.enabled .Values.configMap.enabled }}
{{- if or .Values.externalSecret.enabled .Values.configMap.enabled .Values.extraConfigMaps .Values.extraSecrets }}
envFrom:
{{- if .Values.configMap.enabled }}
- configMapRef:
Expand All @@ -68,6 +68,14 @@ spec:
- secretRef:
name: {{ include "application-core.fullname" . }}-config
{{- end }}
{{- range $configMap := .Values.extraConfigMaps }}
- configMapRef:
name: {{ $configMap }}
{{- end }}
{{- range $secret := .Values.extraSecrets }}
- secretRef:
name: {{ $secret }}
{{- end }}
{{- end }}
resources:
{{- toYaml .Values.initContainer.resources | nindent 12 }}
Expand Down Expand Up @@ -101,7 +109,7 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- if or .Values.externalSecret.enabled .Values.configMap.enabled }}
{{- if or .Values.externalSecret.enabled .Values.configMap.enabled .Values.extraConfigMaps .Values.extraSecrets }}
envFrom:
{{- if .Values.configMap.enabled }}
- configMapRef:
Expand All @@ -111,6 +119,14 @@ spec:
- secretRef:
name: {{ include "application-core.fullname" . }}-config
{{- end }}
{{- range $configMap := .Values.extraConfigMaps }}
- configMapRef:
name: {{ $configMap }}
{{- end }}
{{- range $secret := .Values.extraSecrets }}
- secretRef:
name: {{ $secret }}
{{- end }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/application-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ configMap:
enabled: false
data: {}

# extraConfigMaps and extraSecrets to be mounted as envFrom
extraConfigMaps: []
extraSecrets: []

externalSecret:
enabled: false
data: []
Expand Down

0 comments on commit 948f825

Please sign in to comment.