Use good and automatic defaults for tornjak frontend workingDir (#129)
Signed-off-by: Kevin Fox <[email protected]> Signed-off-by: kfox1111 <[email protected]>
This commit is contained in:
@@ -84,3 +84,13 @@ Create URL for accessing Tornjak APIs
|
||||
{{- print "http://localhost:" .Values.service.port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "tornjak-frontend.workingDir" }}
|
||||
{{- if .Values.workingDir }}
|
||||
{{- .Values.workingDir }}
|
||||
{{- else if (dig "openshift" false .Values.global) }}
|
||||
{{- printf "/opt/app-root/src" }}
|
||||
{{- else }}
|
||||
{{- printf "/usr/src/app" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -53,9 +53,9 @@ spec:
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: cache
|
||||
mountPath: {{ .Values.workingDir }}/node_modules/.cache
|
||||
mountPath: {{ include "tornjak-frontend.workingDir" . }}/node_modules/.cache
|
||||
- name: env
|
||||
mountPath: {{ .Values.workingDir }}/build/tmp
|
||||
mountPath: {{ include "tornjak-frontend.workingDir" . }}/build/tmp
|
||||
- name: logs
|
||||
mountPath: /opt/app-root/src/.npm/
|
||||
{{- with .Values.nodeSelector }}
|
||||
|
||||
Reference in New Issue
Block a user