Fix Tornjak logsDir for Openshift (#344)

* Fix Tornjak logsDir for Openshift

Signed-off-by: Mariusz Sabath <[email protected]>

* Update docs

Signed-off-by: Mariusz Sabath <[email protected]>

* Update charts/spire/charts/tornjak-frontend/templates/_helpers.tpl

Co-authored-by: kfox1111 <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>

---------

Signed-off-by: Mariusz Sabath <[email protected]>
Co-authored-by: kfox1111 <[email protected]>
This commit is contained in:
Mariusz Sabath
2024-05-03 08:04:38 -07:00
committed by GitHub
co-authored by kfox1111
parent 8fef1bd050
commit c37de1ea0c
4 changed files with 13 additions and 3 deletions
@@ -100,3 +100,13 @@ Create URL for accessing Tornjak APIs
{{- printf "/usr/src/app" }}
{{- end }}
{{- end }}
{{- define "tornjak-frontend.logsDir" }}
{{- if .Values.logsDir }}
{{- .Values.logsDir }}
{{- else if (dig "openshift" false .Values.global) }}
{{- printf "/opt/app-root/src/.npm/_cacache/" }}
{{- else }}
{{- printf "/home/node/" }}
{{- end }}
{{- end }}
@@ -61,7 +61,7 @@ spec:
- name: env
mountPath: {{ include "tornjak-frontend.workingDir" . }}/build/tmp
- name: logs
mountPath: {{ .Values.logsDir }}
mountPath: {{ include "tornjak-frontend.logsDir" . }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}