Skip to content

Commit

Permalink
support extraEnvs
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredTan95 committed Oct 25, 2024
1 parent 2c45ff1 commit df55299
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/cmdb/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: 0.1.9
version: 0.1.10

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
4 changes: 4 additions & 0 deletions charts/cmdb/templates/api/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ spec:
envFrom:
- configMapRef:
name: {{ include "cmdb.fullname" . }}-api
{{- with .Values.api.extraEnvs }}
env:
{{- . | toYaml | nindent 12 }}
{{- end }}
{{- with .Values.api.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/cmdb/templates/ui/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ spec:
env:
- name: TZ
value: "Asia/Shanghai"
{{- with .Values.ui.extraEnvs }}
{{- . | toYaml | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.ui.resources | nindent 12 }}
volumeMounts:
Expand Down
11 changes: 10 additions & 1 deletion charts/cmdb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ api:
# Overrides the image tag whose default is the chart appVersion.
tag: "2.4.5"

extraEnvs: []
# extraEnvs:
# - name: MY_BAR
# value: "my_bar"
mysql:
builtIn: true
host: "mysql"
Expand Down Expand Up @@ -239,4 +243,9 @@ ui:

tolerations: []

affinity: {}
affinity: {}

extraEnvs: []
# extraEnvs:
# - name: MY_BAR
# value: "my_bar"

0 comments on commit df55299

Please sign in to comment.