Pass /env-to-ini-mounts via environment variable

This helps to unittest this script

Signed-off-by: justusbunsi <sk.bunsenbrenner@gmail.com>
This commit is contained in:
2024-11-10 20:54:31 +01:00
parent a4e3d75345
commit 9863638f96
2 changed files with 4 additions and 2 deletions

View File

@ -129,8 +129,8 @@ env | (grep -e '^GITEA__' || [[ $? == 1 ]]) > $TMP_EXISTING_ENVS_FILE
# MUST BE CALLED BEFORE OTHER CONFIGURATION
env2ini::generate_initial_secrets
env2ini::load_config_sources '/env-to-ini-mounts/inlines/'
env2ini::load_config_sources '/env-to-ini-mounts/additionals/'
env2ini::load_config_sources "$ENV_TO_INI_MOUNT_POINT/inlines/"
env2ini::load_config_sources "$ENV_TO_INI_MOUNT_POINT/additionals/"
# load existing envs to override auto generated envs
env2ini::reload_preset_envs

View File

@ -109,6 +109,8 @@ spec:
value: /tmp/gitea
- name: TMP_EXISTING_ENVS_FILE
value: /tmp/existing-envs
- name: ENV_TO_INI_MOUNT_POINT
value: /env-to-ini-mounts
{{- if .Values.deployment.env }}
{{- toYaml .Values.deployment.env | nindent 12 }}
{{- end }}