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:
kfox1111
2023-12-11 07:52:44 -08:00
committed by GitHub
parent 7726351955
commit 9f72a8f971
5 changed files with 15 additions and 6 deletions
@@ -87,7 +87,7 @@ port forwarding. See the chart NOTES output for more details.
| `startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` |
| `startupProbe.failureThreshold` | Failure threshold count for startupProbe | `6` |
| `startupProbe.successThreshold` | Success threshold count for startupProbe | `1` |
| `workingDir` | Path containing the Tornjak frontend within the image | `/usr/src/app` |
| `workingDir` | Set to override the default path containing the Tornjak frontend within the image | `""` |
| `ingress.enabled` | Flag to enable ingress for Tornjak frontend service | `false` |
| `ingress.className` | Ingress class name for Tornjak frontend service | `""` |
| `ingress.controllerType` | Specify what type of ingress controller you're using to add the necessary annotations accordingly. If blank, autodetection is attempted. If other, no annotations will be added. Must be one of [ingress-nginx, openshift, other, ""]. | `""` |
@@ -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 }}
@@ -113,8 +113,8 @@ startupProbe:
failureThreshold: 6
successThreshold: 1
## @param workingDir Path containing the Tornjak frontend within the image
workingDir: /usr/src/app
## @param workingDir Set to override the default path containing the Tornjak frontend within the image
workingDir: ""
## @param ingress.enabled Flag to enable ingress for Tornjak frontend service
## @param ingress.className Ingress class name for Tornjak frontend service
-1
View File
@@ -50,7 +50,6 @@ spiffe-oidc-discovery-provider:
fsGroup: null
tornjak-frontend:
workingDir: /opt/app-root/src
podSecurityContext:
runAsUser: null
runAsGroup: null