From d29a7e84a4b8e4146a2c6de68103db81c2369e9a Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 15 Jun 2025 12:41:20 +0000 Subject: [PATCH] fix: correct replicaCount comparison (#884) Reviewed-on: https://gitea.com/gitea/helm-gitea/pulls/884 Reviewed-by: pat-s Co-authored-by: Lunny Xiao Co-committed-by: Lunny Xiao --- templates/gitea/config.yaml | 2 +- templates/gitea/pvc.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/gitea/config.yaml b/templates/gitea/config.yaml index d5655a8..b5d0dd6 100644 --- a/templates/gitea/config.yaml +++ b/templates/gitea/config.yaml @@ -27,7 +27,7 @@ stringData: {{- end }} {{- /* multiple replicas assertions */ -}} - {{- if gt .Values.replicaCount 1.0 -}} + {{- if gt (.Values.replicaCount | int) 1 -}} {{- if .Values.gitea.config.cron -}} {{- if .Values.gitea.config.cron.GIT_GC_REPOS -}} {{- if eq .Values.gitea.config.cron.GIT_GC_REPOS.ENABLED true -}} diff --git a/templates/gitea/pvc.yaml b/templates/gitea/pvc.yaml index 035dbc4..036e3a3 100644 --- a/templates/gitea/pvc.yaml +++ b/templates/gitea/pvc.yaml @@ -10,7 +10,7 @@ metadata: {{ .Values.persistence.labels | toYaml | indent 4}} spec: accessModes: - {{- if gt .Values.replicaCount 1.0 }} + {{- if gt (.Values.replicaCount | int) 1 }} - ReadWriteMany {{- else }} {{- .Values.persistence.accessModes | toYaml | nindent 4 }}