
### Description of the change Add config fallbacks for `session`, `cache` and `queue` including tests. ### Benefits If users disable the default `redis-cluster` sub-chart dependency, this will configure the respective sections to use the Gitea defaults as listed in https://docs.gitea.com/next/administration/config-cheat-sheet. ### Possible drawbacks Users will run on non-optimal settings for production without knowing their config. ### Applicable issues - fixes #584 #573 #489 #476 #468 #453 ### Checklist <!-- [Place an '[X]' (no spaces) in all applicable fields. Please remove unrelated fields.] --> - [x] Parameters are documented in the `values.yaml` and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm) - [x] Breaking changes are documented in the `README.md` - [x] Templating unittests are added Co-authored-by: justusbunsi <sk.bunsenbrenner@gmail.com> Co-authored-by: justusbunsi <justusbunsi@noreply.gitea.com> Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/585 Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.com>
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
suite: config template | queue config
|
|
release:
|
|
name: gitea-unittests
|
|
namespace: testing
|
|
tests:
|
|
- it: "queue is configured correctly for redis-cluster"
|
|
template: templates/gitea/config.yaml
|
|
set:
|
|
redis-cluster:
|
|
enabled: true
|
|
asserts:
|
|
- documentIndex: 0
|
|
equal:
|
|
path: stringData.queue
|
|
value: |-
|
|
CONN_STR=redis+cluster://:@gitea-unittests-redis-cluster-headless.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s&
|
|
TYPE=redis
|
|
|
|
- it: "queue is configured correctly for 'levelDB' when redis-cluster is disabled"
|
|
template: templates/gitea/config.yaml
|
|
set:
|
|
redis-cluster:
|
|
enabled: false
|
|
asserts:
|
|
- documentIndex: 0
|
|
equal:
|
|
path: stringData.queue
|
|
value: |-
|
|
CONN_STR=
|
|
TYPE=level
|
|
|
|
- it: "queue can be customized when redis-cluster is disabled"
|
|
template: templates/gitea/config.yaml
|
|
set:
|
|
redis-cluster:
|
|
enabled: false
|
|
gitea.config.queue.TYPE: custom-type
|
|
gitea.config.queue.CONN_STR: custom-connection-string
|
|
asserts:
|
|
- documentIndex: 0
|
|
equal:
|
|
path: stringData.queue
|
|
value: |-
|
|
CONN_STR=custom-connection-string
|
|
TYPE=custom-type
|