Skip to content

Commit 54d59e2

Browse files
committed
Support loading from environment variables
1 parent 078a404 commit 54d59e2

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

backend/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: backend
3-
version: 0.1.0
3+
version: 0.1.1
44
description: Backend of the Snoty application suite
55
type: application
66
home: https://snoty.me

backend/templates/deployment.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ metadata:
88
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
99
{{- end }}
1010
spec:
11+
replicas: {{ .Values.replicas }}
1112
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
1213
selector:
1314
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
@@ -34,7 +35,13 @@ spec:
3435
{{- include "common.tplvalues.render" (dict "value" .Values.extraContainerPorts "context" $) | nindent 12 }}
3536
{{- end }}
3637
env:
37-
{{ include "snoty.envLoaders" . | nindent 8 | trim }}
38+
{{- $envLoaders := include "snoty.envLoaders" . | nindent 8 | trim }}
39+
{{- if $envLoaders }}
40+
{{ $envLoaders }}
41+
{{- end }}
42+
{{- if .Values.extraEnvVars }}
43+
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 10 }}
44+
{{- end }}
3845
volumeMounts:
3946
- mountPath: /app/application.yml
4047
name: app-config

backend/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ service:
112112
##
113113
sessionAffinityConfig: {}
114114

115+
replicas: 1
116+
115117
appConfig:
116118
environment: PRODUCTION
117119
## @param appConfig.database database configuration
@@ -121,6 +123,8 @@ appConfig:
121123
## @param extraAppConfig Add your own settings, to be added to the `configuration.yml`
122124
extraAppConfig: {}
123125

126+
extraEnvVars: []
127+
124128
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
125129
##
126130
ingress:

0 commit comments

Comments
 (0)