From 2c78da9c3e497ee35450cdf6948c17939dd041ed Mon Sep 17 00:00:00 2001 From: bachorp Date: Wed, 26 Mar 2025 17:16:17 +0000 Subject: [PATCH] docs: set full path of values.yaml key in output to user (#832) Currently, the reported path of the values to be changed is not always correct (especially `gitea.persistence` vs. `persistence`). Co-authored-by: techknowlogick Reviewed-on: https://gitea.com/gitea/helm-gitea/pulls/832 Reviewed-by: techknowlogick Co-authored-by: bachorp Co-committed-by: bachorp --- templates/gitea/config.yaml | 4 ++-- unittests/helm/deployment/HA.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/gitea/config.yaml b/templates/gitea/config.yaml index 1ef5b61..d5655a8 100644 --- a/templates/gitea/config.yaml +++ b/templates/gitea/config.yaml @@ -31,13 +31,13 @@ stringData: {{- if .Values.gitea.config.cron -}} {{- if .Values.gitea.config.cron.GIT_GC_REPOS -}} {{- if eq .Values.gitea.config.cron.GIT_GC_REPOS.ENABLED true -}} - {{ 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 'gitea.config.cron.GIT_GC_REPOS.enabled = false'." }} {{- end }} {{- end }} {{- end }} {{- if eq (first .Values.persistence.accessModes) "ReadWriteOnce" -}} - {{- fail "When using multiple replicas, a RWX file system is required and gitea.persistence.accessModes[0] must be set to ReadWriteMany." -}} + {{- fail "When using multiple replicas, a RWX file system is required and persistence.accessModes[0] must be set to ReadWriteMany." -}} {{- end }} {{- if .Values.gitea.config.indexer -}} {{- if eq .Values.gitea.config.indexer.ISSUE_INDEXER_TYPE "bleve" -}} diff --git a/unittests/helm/deployment/HA.yaml b/unittests/helm/deployment/HA.yaml index 8cc4dd1..3828809 100644 --- a/unittests/helm/deployment/HA.yaml +++ b/unittests/helm/deployment/HA.yaml @@ -20,14 +20,14 @@ tests: ENABLED: true asserts: - failedTemplate: - errorMessage: "Invoking the garbage collector via CRON is not yet supported when running with multiple replicas. Please set 'cron.GIT_GC_REPOS.enabled = false'." + errorMessage: "Invoking the garbage collector via CRON is not yet supported when running with multiple replicas. Please set 'gitea.config.cron.GIT_GC_REPOS.enabled = false'." - it: fails with multiple replicas and RWX file system not set template: templates/gitea/deployment.yaml set: replicaCount: 2 asserts: - failedTemplate: - errorMessage: "When using multiple replicas, a RWX file system is required and gitea.persistence.accessModes[0] must be set to ReadWriteMany." + errorMessage: "When using multiple replicas, a RWX file system is required and persistence.accessModes[0] must be set to ReadWriteMany." - it: fails with multiple replicas and bleve issue indexer template: templates/gitea/deployment.yaml set: