From 1331ae5e960004f996017d5832e7f135e51e9daf Mon Sep 17 00:00:00 2001 From: pat-s Date: Sun, 27 Aug 2023 12:05:56 +0000 Subject: [PATCH] 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 Co-authored-by: pat-s Co-committed-by: pat-s --- templates/gitea/config.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/templates/gitea/config.yaml b/templates/gitea/config.yaml index 3f8b7e6..1c7ab1d 100644 --- a/templates/gitea/config.yaml +++ b/templates/gitea/config.yaml @@ -25,10 +25,8 @@ stringData: {{- /* multiple replicas assertions */ -}} {{- if gt .Values.replicaCount 1.0 -}} - {{- if .Values.gitea.config.cron.GIT_GC_REPOS -}} - {{- 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 'GIT_GC_REPOS.enabled = false'." -}} - {{- end }} + {{- if (get (get .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'." -}} {{- end }} {{- if eq (first .Values.persistence.accessModes) "ReadWriteOnce" -}}