Skip to content

Commit

Permalink
Merge pull request #95 from vania-pooh/master
Browse files Browse the repository at this point in the history
Ability to pass environment variables to Moon pod containers (fixes #94)
  • Loading branch information
aandryashin authored Jan 28, 2022
2 parents 1c3fc54 + 689964c commit 2707c8f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
21 changes: 21 additions & 0 deletions moon/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ spec:
{{- else }}
- -disable-memory-limits
{{- end }}
{{- if .Values.moon.env }}
env:
{{- range $key, $value := .Values.moon.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.moon.enabled.resources }}
{{- if .Values.moon.resources }}
resources:
Expand Down Expand Up @@ -168,6 +175,13 @@ spec:
{{- end }}
{{- if .Values.moon.enabled.resources }}
{{- if .Values.moon.api }}
{{- if .Values.moon.api.env }}
env:
{{- range $key, $value := .Values.moon.api.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.moon.api.resources }}
resources:
{{ toYaml .Values.moon.api.resources | indent 10 }}
Expand Down Expand Up @@ -211,6 +225,13 @@ spec:
{{- end }}
{{- if .Values.moon.enabled.resources }}
{{- if .Values.moon.ui }}
{{- if .Values.moon.ui.env }}
env:
{{- range $key, $value := .Values.moon.ui.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.moon.ui.resources }}
resources:
{{ toYaml .Values.moon.ui.resources | indent 10 }}
Expand Down
16 changes: 16 additions & 0 deletions moon/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ moon:
# ##
# replicas: 2

# ##
# ## Environment variables passed to moon container.
# ##
# env: {}

##
## Resources assigned to moon container.
##
Expand Down Expand Up @@ -139,6 +144,12 @@ moon:
requests:
cpu: "0.05"
memory: 64Mi

# ##
# ## Environment variables passed to moon-api container.
# ##
# env: {}

# ##
# ## Override moon-api image
# ##
Expand All @@ -160,6 +171,11 @@ moon:
requests:
cpu: "0.05"
memory: 64Mi
# ##
# ## Environment variables passed to moon-ui container.
# ##
# env: {}

# ##
# ## Override moon-ui image
# ##
Expand Down

0 comments on commit 2707c8f

Please sign in to comment.