Gitea configuration values containing spaces breaks the init-app-ini initContainer #260

Closed
opened 2021-12-09 10:24:56 +00:00 by nmasse-itix · 0 comments
Contributor

Hello,

I'm using this helm chart to deploy a Gitea instance with the following configuration.

gitea:
  config:
    cron.update_mirrors:
      SCHEDULE: "@every 24h"

The gitea "init-app-ini" initContainer fails with the following error:

bash: export: `24h': not a valid identifier

The error can be fixed by enclosing the value in single quotes in templates/gitea/config.yaml:

- export ENV_TO_INI__{{ $key | upper | replace "." "_0X2E_" | replace "-" "_0X2D_" }}__{{ $n_key | upper }}={{ $n_value }}
+ export ENV_TO_INI__{{ $key | upper | replace "." "_0X2E_" | replace "-" "_0X2D_" }}__{{ $n_key | upper }}='{{ $n_value }}'

[...]

-export ENV_TO_INI__{{ $key | upper | replace "." "_0X2E_" | replace "-" "_0X2D_" }}__{{ $key | upper }}={{ $value }}
+export ENV_TO_INI__{{ $key | upper | replace "." "_0X2E_" | replace "-" "_0X2D_" }}__{{ $key | upper }}='{{ $value }}'
Hello, I'm using this helm chart to deploy a Gitea instance with the following configuration. ```yaml gitea: config: cron.update_mirrors: SCHEDULE: "@every 24h" ``` The gitea "init-app-ini" initContainer fails with the following error: ``` bash: export: `24h': not a valid identifier ``` The error can be fixed by enclosing the value in single quotes in templates/gitea/config.yaml: ```diff - export ENV_TO_INI__{{ $key | upper | replace "." "_0X2E_" | replace "-" "_0X2D_" }}__{{ $n_key | upper }}={{ $n_value }} + export ENV_TO_INI__{{ $key | upper | replace "." "_0X2E_" | replace "-" "_0X2D_" }}__{{ $n_key | upper }}='{{ $n_value }}' [...] -export ENV_TO_INI__{{ $key | upper | replace "." "_0X2E_" | replace "-" "_0X2D_" }}__{{ $key | upper }}={{ $value }} +export ENV_TO_INI__{{ $key | upper | replace "." "_0X2E_" | replace "-" "_0X2D_" }}__{{ $key | upper }}='{{ $value }}' ```
justusbunsi added the
kind
bug
label 2021-12-18 18:00:52 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/helm-chart#260
No description provided.