Fix GIT_GC_CHECK for multiple replicas (#490)

### Benefits

Asserting the value existence failed previously.

### Applicable issues

fixes #488

### Additional information

No unit tests possible as value is parsed as a secret and then into `app.ini`.

Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/490
Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.com>
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
This commit is contained in:
pat-s 2023-08-27 12:05:56 +00:00 committed by justusbunsi
parent 35fcb41ce2
commit 1331ae5e96

View File

@ -25,10 +25,8 @@ stringData:
{{- /* multiple replicas assertions */ -}} {{- /* multiple replicas assertions */ -}}
{{- if gt .Values.replicaCount 1.0 -}} {{- if gt .Values.replicaCount 1.0 -}}
{{- if .Values.gitea.config.cron.GIT_GC_REPOS -}} {{- if (get (get .Values.gitea.config "cron.GIT_GC_REPOS") "ENABLED") -}}
{{- if .Values.gitea.config.cron.GIT_GC_REPOS.enabled -}} {{- fail "Invoking the garbage collector via CRON is not yet supported when running with multiple replicas. Please set 'cron.GIT_GC_REPOS.enabled = false'." -}}
{{- fail "Invoking the garbage collector via CRON is not yet supported when running with multiple replicas. Please set 'GIT_GC_REPOS.enabled = false'." -}}
{{- end }}
{{- end }} {{- end }}
{{- if eq (first .Values.persistence.accessModes) "ReadWriteOnce" -}} {{- if eq (first .Values.persistence.accessModes) "ReadWriteOnce" -}}