Skip to content

Commit

Permalink
refactor(chart/hami-webui): extract env variables for frontend and ba…
Browse files Browse the repository at this point in the history
…ckend containers
  • Loading branch information
Nimbus318 committed Oct 12, 2024
1 parent fb5e120 commit 087611e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 3 additions & 2 deletions charts/hami-webui/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ spec:
image: "{{ .Values.image.frontend.repository }}:{{ .Values.image.frontend.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.frontend.pullPolicy }}
env:
- name: TZ
value: "Asia/Shanghai"
{{- toYaml .Values.env.frontend | nindent 12 }}
ports:
- name: http
containerPort: 3000
Expand All @@ -49,6 +48,8 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.backend.repository }}:{{ .Values.image.backend.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.backend.pullPolicy }}
env:
{{- toYaml .Values.env.backend | nindent 12 }}
ports:
- name: metrics
containerPort: 8000
Expand Down
8 changes: 8 additions & 0 deletions charts/hami-webui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ resources:
# cpu: 100m
# memory: 128Mi

env:
frontend:
- name: TZ
value: "Asia/Shanghai"
backend:
- name: TZ
value: "Asia/Shanghai"

serviceMonitor:
enabled: true
interval: 15s
Expand Down

0 comments on commit 087611e

Please sign in to comment.