From 5d7c12627acb5ce608609f61d62f18ca8f2f25ed Mon Sep 17 00:00:00 2001 From: Ryan Campbell Date: Fri, 2 Aug 2024 02:19:13 +0000 Subject: [PATCH 1/3] updating config directory for appsettings.json --- chart/templates/_appsettings.tpl | 2 +- chart/templates/payload_app_template.yaml | 3 +++ chart/values.yaml | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/chart/templates/_appsettings.tpl b/chart/templates/_appsettings.tpl index 4989823..2bda848 100644 --- a/chart/templates/_appsettings.tpl +++ b/chart/templates/_appsettings.tpl @@ -62,5 +62,5 @@ configMap: {{- $serviceValues := .serviceValues }} {{- $globalValues := .globalValues }} name: {{ $serviceValues.appName }}-config-volume -mountPath: {{ $serviceValues.workingDir }}-config +mountPath: {{ $globalValues.spacefxSecretDirectory }} {{- end }} \ No newline at end of file diff --git a/chart/templates/payload_app_template.yaml b/chart/templates/payload_app_template.yaml index aa634a6..9bc4f87 100644 --- a/chart/templates/payload_app_template.yaml +++ b/chart/templates/payload_app_template.yaml @@ -75,4 +75,7 @@ volumes: {{- if $serviceValues.serviceAccount.enabled }} {{- include "spacefx.service_account" (dict "serviceValues" $serviceValues "globalValues" $globalValues) }} {{- end }} +{{- if $serviceValues.restartPolicy.enabled }} +{{ $serviceValues.restartPolicy.restartPolicy | quote }} +{{- end }} {{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index 6becfce..7caf898 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -393,6 +393,9 @@ services: workingDir: /workspaces/hostsvc-position payloadapp: payloadappTemplate: + restartPolicy: + enabled: false + restartPolicy: Never annotations: enabled: false daprEnabled: false From 4572b3f2caf6120c067b2b07a833e797a42ce812 Mon Sep 17 00:00:00 2001 From: Ryan Campbell Date: Fri, 2 Aug 2024 02:24:23 +0000 Subject: [PATCH 2/3] fixing repeat volume mount --- chart/templates/payload_app_template.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/chart/templates/payload_app_template.yaml b/chart/templates/payload_app_template.yaml index 9bc4f87..b026f8e 100644 --- a/chart/templates/payload_app_template.yaml +++ b/chart/templates/payload_app_template.yaml @@ -25,8 +25,8 @@ # VolumeMounts {{- if $serviceValues.fileServer.volumeMountsEnabled }} volumeMounts: -{{- $secretsMount := printf "%s" (include "spacefx.appsettings.json.volumemount" (dict "globalValues" $globalValues "serviceValues" $serviceValues) | nindent 2 | trim) }} -{{- printf "- %s" $secretsMount | nindent 2 }} +{{- $appSettingsMount := printf "%s" (include "spacefx.appsettings.json.volumemount" (dict "globalValues" $globalValues "serviceValues" $serviceValues) | nindent 2 | trim) }} +{{- printf "- %s" $appSettingsMount | nindent 2 }} {{- range $volumeKey, $volumeName := $globalValues.xferVolumes }} {{- $fileServerVolumeMount := printf "%s" (include "spacefx.fileserver.clientapp.volumemount" (dict "globalValues" $globalValues "serviceValues" $serviceValues "volumeName" $volumeName) | nindent 2 | trim) }} {{- printf "- %s" $fileServerVolumeMount | nindent 2 }} @@ -43,8 +43,6 @@ volumeMounts: mountPath: {{ $hostDirectoryMount.hostPath }} {{- end }} {{- end }} -{{- $appSettingsMount := printf "%s" (include "spacefx.appsettings.json.volumemount" (dict "globalValues" $globalValues "serviceValues" $serviceValues) | nindent 2 | trim) }} -{{- printf "- %s" $appSettingsMount | nindent 2 }} {{- end }} # Volumes {{- if $serviceValues.fileServer.volumesEnabled }} From 50380ae8232824b22fd56e225a50c98c79da9745 Mon Sep 17 00:00:00 2001 From: Ryan Campbell Date: Fri, 2 Aug 2024 02:35:43 +0000 Subject: [PATCH 3/3] moving appsettings volume mount to config subdirectory --- chart/templates/_appsettings.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/templates/_appsettings.tpl b/chart/templates/_appsettings.tpl index 2bda848..713b03b 100644 --- a/chart/templates/_appsettings.tpl +++ b/chart/templates/_appsettings.tpl @@ -62,5 +62,5 @@ configMap: {{- $serviceValues := .serviceValues }} {{- $globalValues := .globalValues }} name: {{ $serviceValues.appName }}-config-volume -mountPath: {{ $globalValues.spacefxSecretDirectory }} +mountPath: {{ $globalValues.spacefxSecretDirectory }}/config {{- end }} \ No newline at end of file