The top-level `replicaCount` value only ever set the replica count of the Gitea Deployment, but was declared next to chart-wide settings. Moving it into the `deployment` dict completes the consolidation already done for `affinity`, `dnsConfig`, `nodeSelector`, `priorityClassName`, `resources`, `schedulerName`, `strategy`, `tolerations` and `topologySpreadConstraints`. The key was renamed from `replicaCount` to `replicas` at the same time. Every other key inside the `deployment` dict mirrors the name of the corresponding Kubernetes field, so `deployment.replicas` maps one to one onto `spec.replicas` and removes the need to remember a chart-specific alias. A deprecation check fails the release when the removed top-level value is still set. Silently ignoring it would be severe here: the release would scale back down to a single replica without any warning, and the HA guards in the PVC and config templates, which key off the replica count, would no longer apply. BREAKING CHANGE: `replicaCount` no longer exists. Use `deployment.replicas` instead. Installations that still set `replicaCount` will fail unless `checkDeprecation` is set to `false`. Co-authored-by: Copilot <copilot@github.com>
69 lines
2.3 KiB
YAML
69 lines
2.3 KiB
YAML
suite: deployment template (HA)
|
|
release:
|
|
name: gitea-unittests
|
|
namespace: testing
|
|
templates:
|
|
- templates/gitea/deployment.yaml
|
|
- templates/gitea/secret_admin.yaml
|
|
- templates/gitea/secret_config.yaml
|
|
- templates/gitea/secret_gpg.yaml
|
|
- templates/gitea/secret_init.yaml
|
|
- templates/gitea/secret_inlineConfig.yaml
|
|
- templates/gitea/secret_metrics.yaml
|
|
tests:
|
|
- it: fails with multiple replicas and "GIT_GC_REPOS" enabled
|
|
template: templates/gitea/secret_config.yaml
|
|
set:
|
|
deployment:
|
|
replicas: 2
|
|
persistence:
|
|
accessModes:
|
|
- ReadWriteMany
|
|
gitea:
|
|
config:
|
|
cron:
|
|
GIT_GC_REPOS:
|
|
ENABLED: true
|
|
asserts:
|
|
- failedTemplate:
|
|
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/secret_config.yaml
|
|
set:
|
|
deployment:
|
|
replicas: 2
|
|
asserts:
|
|
- failedTemplate:
|
|
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/secret_config.yaml
|
|
set:
|
|
deployment:
|
|
replicas: 2
|
|
persistence:
|
|
accessModes:
|
|
- ReadWriteMany
|
|
gitea:
|
|
config:
|
|
indexer:
|
|
ISSUE_INDEXER_TYPE: bleve
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: "When using multiple replicas, the issue indexer (gitea.config.indexer.ISSUE_INDEXER_TYPE) must be set to a HA-ready provider such as 'meilisearch', 'elasticsearch' or 'db' (if the DB is HA-ready)."
|
|
- it: fails with multiple replicas and bleve repo indexer
|
|
template: templates/gitea/secret_config.yaml
|
|
set:
|
|
deployment:
|
|
replicas: 2
|
|
persistence:
|
|
accessModes:
|
|
- ReadWriteMany
|
|
gitea:
|
|
config:
|
|
indexer:
|
|
REPO_INDEXER_TYPE: bleve
|
|
REPO_INDEXER_ENABLED: true
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: "When using multiple replicas, the repo indexer (gitea.config.indexer.REPO_INDEXER_TYPE) must be set to 'meilisearch' or 'elasticsearch' or disabled."
|