Skip to content

Commit c4c74dd

Browse files
committed
Fix parsing issue in app.yaml
1 parent 27a6eb7 commit c4c74dd

1 file changed

Lines changed: 21 additions & 19 deletions

File tree

.diploi/helm/app.yaml

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: apps/v1
2-
{{- if eq .Values.stage "development"}}
2+
{{- if eq .Values.stage "development" }}
33
kind: StatefulSet
44
{{- else }}
55
kind: Deployment
@@ -12,7 +12,7 @@ spec:
1212
selector:
1313
matchLabels:
1414
app: app
15-
{{- if eq .Values.stage "development"}}
15+
{{- if eq .Values.stage "development" }}
1616
serviceName: app
1717
{{- else }}
1818
strategy:
@@ -30,16 +30,18 @@ spec:
3030
terminationGracePeriodSeconds: 10
3131
imagePullSecrets:
3232
- name: diploi-pull-secret
33-
{{- if eq .Values.stage "development"}}
33+
{{- if eq .Values.stage "development" }}
3434
securityContext:
3535
runAsUser: 1000
3636
runAsGroup: 1000
3737
initContainers:
3838
- name: install-dependencies
3939
image: {{ .Values.images.app }}
4040
imagePullPolicy: Always
41-
command: ['npm', 'install']
42-
workingDir: /app{{ .Values.folder }}
41+
command:
42+
- npm
43+
- install
44+
workingDir: /app{{ .Values.folder }}
4345
volumeMounts:
4446
- name: app-mount
4547
mountPath: /app
@@ -51,20 +53,20 @@ spec:
5153
ports:
5254
- containerPort: 3000
5355
{{- if eq .Values.stage "development" }}
54-
workingDir: /app{{ .Values.folder }}
55-
{{- with .Values.containerCommands.developmentStart }}
56-
command:
57-
- /bin/sh
58-
- -c
59-
- "{{ . }}"
60-
{{- end }}
56+
workingDir: /app{{ .Values.folder }}
57+
{{- with .Values.containerCommands.developmentStart }}
58+
command:
59+
- /bin/sh
60+
- -c
61+
- "{{ . }}"
62+
{{- end }}
6163
{{- else }}
62-
{{- with .Values.containerCommands.productionStart }}
63-
command:
64-
- /bin/sh
65-
- -c
66-
- "{{ . }}"
67-
{{- end }}
64+
{{- with .Values.containerCommands.productionStart }}
65+
command:
66+
- /bin/sh
67+
- -c
68+
- "{{ . }}"
69+
{{- end }}
6870
{{- end }}
6971
env:
7072
{{- range .Values.env }}
@@ -85,4 +87,4 @@ spec:
8587
- name: app-mount
8688
hostPath:
8789
path: {{ .Values.storage.code.hostPath }}
88-
{{- end }}
90+
{{- end }}

0 commit comments

Comments
 (0)