diff --git a/scripts/init-containers/config_environment.sh b/scripts/init-containers/config_environment.sh index fd4f361..98d89d3 100755 --- a/scripts/init-containers/config_environment.sh +++ b/scripts/init-containers/config_environment.sh @@ -73,9 +73,9 @@ function env2ini::reload_preset_envs() { env2ini::log " + '${setting}'" export "${setting^^}=${value}" # '^^' makes the variable content uppercase - done < "/tmp/existing-envs" + done < "$TMP_EXISTING_ENVS_FILE" - rm /tmp/existing-envs + rm $TMP_EXISTING_ENVS_FILE } @@ -124,7 +124,7 @@ function env2ini::generate_initial_secrets() { } # save existing envs prior to script execution. Necessary to keep order of preexisting and custom envs -env | (grep -e '^GITEA__' || [[ $? == 1 ]]) > /tmp/existing-envs +env | (grep -e '^GITEA__' || [[ $? == 1 ]]) > $TMP_EXISTING_ENVS_FILE # MUST BE CALLED BEFORE OTHER CONFIGURATION env2ini::generate_initial_secrets diff --git a/templates/gitea/deployment.yaml b/templates/gitea/deployment.yaml index 9981e67..24aa028 100644 --- a/templates/gitea/deployment.yaml +++ b/templates/gitea/deployment.yaml @@ -107,6 +107,8 @@ spec: value: /data - name: GITEA_TEMP value: /tmp/gitea + - name: TMP_EXISTING_ENVS_FILE + value: /tmp/existing-envs {{- if .Values.deployment.env }} {{- toYaml .Values.deployment.env | nindent 12 }} {{- end }}