You've already forked helm-gitea
Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
f0d0c00ed6 | |||
323bcd7526 | |||
59b246302b | |||
223069d042 | |||
060945a486 | |||
ff932a0bf9 | |||
88a1650ce4 | |||
d875809299 | |||
a1d9059e53 | |||
7e403d5ef6 | |||
0081cabe0b | |||
b265d87f55 | |||
8bcd2dc63b | |||
34c1212939 | |||
5c4bcaa1e3 |
@ -44,7 +44,7 @@ jobs:
|
|||||||
echo ${{ secrets.DOCKER_CHARTS_PASSWORD }} | docker login -u ${{ secrets.DOCKER_CHARTS_USERNAME }} --password-stdin
|
echo ${{ secrets.DOCKER_CHARTS_PASSWORD }} | docker login -u ${{ secrets.DOCKER_CHARTS_USERNAME }} --password-stdin
|
||||||
# FIXME: use upstream after https://github.com/technosophos/helm-gpg/issues/1 is solved
|
# FIXME: use upstream after https://github.com/technosophos/helm-gpg/issues/1 is solved
|
||||||
helm plugin install https://github.com/pat-s/helm-gpg
|
helm plugin install https://github.com/pat-s/helm-gpg
|
||||||
helm dependency update
|
helm dependency build
|
||||||
helm package --version "${GITHUB_REF#refs/tags/v}" ./
|
helm package --version "${GITHUB_REF#refs/tags/v}" ./
|
||||||
helm gpg sign "gitea-${GITHUB_REF#refs/tags/v}.tgz"
|
helm gpg sign "gitea-${GITHUB_REF#refs/tags/v}.tgz"
|
||||||
mkdir gitea
|
mkdir gitea
|
||||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"yaml.schemas": {
|
"yaml.schemas": {
|
||||||
"https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json": [
|
"https://raw.githubusercontent.com/helm-unittest/helm-unittest/v0.3.6/schema/helm-testsuite.json": [
|
||||||
"/unittests/**/*.yaml"
|
"/unittests/**/*.yaml"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: postgresql
|
- name: postgresql
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 12.12.10
|
version: 13.2.24
|
||||||
- name: postgresql-ha
|
- name: postgresql-ha
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 11.9.4
|
version: 12.3.3
|
||||||
- name: redis-cluster
|
- name: redis-cluster
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 9.1.3
|
version: 9.1.3
|
||||||
digest: sha256:6bda620320a05a5ea4efb4189a86d30092aeb0a6f3e0009538f4bea312af0863
|
digest: sha256:c4ae8a7ddfb6670acc7f39d5728a0929f6c7666d32459229b5e4e66b19749677
|
||||||
generated: "2023-11-14T00:08:15.790217865Z"
|
generated: "2023-12-17T00:11:27.841588235Z"
|
||||||
|
@ -3,7 +3,7 @@ name: gitea
|
|||||||
description: Gitea Helm chart for Kubernetes
|
description: Gitea Helm chart for Kubernetes
|
||||||
type: application
|
type: application
|
||||||
version: 0.0.0
|
version: 0.0.0
|
||||||
appVersion: 1.21.0
|
appVersion: 1.21.2
|
||||||
icon: https://gitea.com/assets/img/logo.svg
|
icon: https://gitea.com/assets/img/logo.svg
|
||||||
|
|
||||||
keywords:
|
keywords:
|
||||||
@ -36,12 +36,12 @@ dependencies:
|
|||||||
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql
|
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql
|
||||||
- name: postgresql
|
- name: postgresql
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 12.12.10
|
version: 13.2.24
|
||||||
condition: postgresql.enabled
|
condition: postgresql.enabled
|
||||||
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql-ha/Chart.yaml
|
# https://github.com/bitnami/charts/blob/main/bitnami/postgresql-ha/Chart.yaml
|
||||||
- name: postgresql-ha
|
- name: postgresql-ha
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 11.9.4
|
version: 12.3.3
|
||||||
condition: postgresql-ha.enabled
|
condition: postgresql-ha.enabled
|
||||||
# https://github.com/bitnami/charts/blob/main/bitnami/redis-cluster/Chart.yaml
|
# https://github.com/bitnami/charts/blob/main/bitnami/redis-cluster/Chart.yaml
|
||||||
- name: redis-cluster
|
- name: redis-cluster
|
||||||
|
2
Makefile
2
Makefile
@ -9,7 +9,7 @@ readme: prepare-environment
|
|||||||
|
|
||||||
.PHONY: unittests
|
.PHONY: unittests
|
||||||
unittests:
|
unittests:
|
||||||
helm unittest --strict -f 'unittests/**/*.yaml' ./
|
helm unittest --strict -f 'unittests/**/*.yaml' -f 'unittests/dependency-major-image-check.yaml' ./
|
||||||
|
|
||||||
.PHONY: helm
|
.PHONY: helm
|
||||||
update-helm-dependencies:
|
update-helm-dependencies:
|
||||||
|
69
README.md
69
README.md
@ -3,6 +3,9 @@
|
|||||||
- [Introduction](#introduction)
|
- [Introduction](#introduction)
|
||||||
- [Update and versioning policy](#update-and-versioning-policy)
|
- [Update and versioning policy](#update-and-versioning-policy)
|
||||||
- [Dependencies](#dependencies)
|
- [Dependencies](#dependencies)
|
||||||
|
- [HA Dependencies](#ha-dependencies)
|
||||||
|
- [Non-HA Dependencies](#non-ha-dependencies)
|
||||||
|
- [Dependency Versioning](#dependency-versioning)
|
||||||
- [Installing](#installing)
|
- [Installing](#installing)
|
||||||
- [High Availability](#high-availability)
|
- [High Availability](#high-availability)
|
||||||
- [Configuration](#configuration)
|
- [Configuration](#configuration)
|
||||||
@ -11,6 +14,7 @@
|
|||||||
- [Server defaults](#server-defaults)
|
- [Server defaults](#server-defaults)
|
||||||
- [Metrics defaults](#metrics-defaults)
|
- [Metrics defaults](#metrics-defaults)
|
||||||
- [Rootless Defaults](#rootless-defaults)
|
- [Rootless Defaults](#rootless-defaults)
|
||||||
|
- [Session, Cache and Queue](#session-cache-and-queue)
|
||||||
- [Single-Pod Configurations](#single-pod-configurations)
|
- [Single-Pod Configurations](#single-pod-configurations)
|
||||||
- [Additional _app.ini_ settings](#additional-appini-settings)
|
- [Additional _app.ini_ settings](#additional-appini-settings)
|
||||||
- [User defined environment variables in app.ini](#user-defined-environment-variables-in-appini)
|
- [User defined environment variables in app.ini](#user-defined-environment-variables-in-appini)
|
||||||
@ -79,13 +83,42 @@ Yet most often no issues will be encountered and the chart maintainers aim to co
|
|||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
Gitea can be run with an external database and cache.
|
Gitea is most performant when run with an external database and cache.
|
||||||
This chart provides those dependencies, which can be enabled, or disabled via configuration.
|
This chart provides those dependencies via sub-charts.
|
||||||
|
Users can also configure their own external providers via the configuration.
|
||||||
|
|
||||||
Dependencies:
|
### HA Dependencies
|
||||||
|
|
||||||
- PostgreSQL HA ([configuration](#postgresql))
|
These dependencies are enabled by default:
|
||||||
- Redis Cluster ([configuration](#cache))
|
|
||||||
|
- PostgreSQL HA ([Bitnami PostgreSQL-HA](https://github.com/bitnami/charts/blob/main/bitnami/postgresql-ha/Chart.yaml))
|
||||||
|
- Redis-Cluster ([Bitnami Redis-Cluster](https://github.com/bitnami/charts/blob/main/bitnami/redis-cluster/Chart.yaml))
|
||||||
|
|
||||||
|
### Non-HA Dependencies
|
||||||
|
|
||||||
|
Alternatively, the following non-HA replacements are available:
|
||||||
|
|
||||||
|
- PostgreSQL ([Bitnami PostgreSQL](postgresql](https://github.com/bitnami/charts/blob/main/bitnami/postgresql/Chart.yaml)))
|
||||||
|
|
||||||
|
### Dependency Versioning
|
||||||
|
|
||||||
|
Updates of sub-charts will be incorporated into the Gitea chart as they are released.
|
||||||
|
The reasoning behind this is that new users of the chart will start with the most recent sub-chart dependency versions.
|
||||||
|
|
||||||
|
**Note** If you want to stay on an older appVersion of a sub-chart dependency (e.g. PostgreSQL), you need to override the image tag in your `values.yaml` file.
|
||||||
|
In fact, we recommend to do so right from the start to be independent of major sub-chart dependency changes as they are released.
|
||||||
|
There is no need to update to every new PostgreSQL major version - you can happily skip some and do larger updates when you are ready for them.
|
||||||
|
|
||||||
|
We recommend to use a rolling tag like `:<majorVersion>-debian-<debian major version>` to incorporate minor and patch updates for the respective major version as they are released.
|
||||||
|
Alternatively you can also use a versioning helper tool like [renovate](https://github.com/renovatebot/renovate).
|
||||||
|
|
||||||
|
Please double-check the image repository and available tags in the sub-chart:
|
||||||
|
|
||||||
|
- [PostgreSQL-HA](https://hub.docker.com/r/bitnami/postgresql-repmgr/tags)
|
||||||
|
- [PostgreSQL](https://hub.docker.com/r/bitnami/postgresql/tags)
|
||||||
|
- [Redis Cluster](https://hub.docker.com/r/bitnami/redis-cluster/tags)
|
||||||
|
|
||||||
|
and look up the image tag which fits your needs on Dockerhub.
|
||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
|
||||||
@ -197,6 +230,16 @@ If `.Values.image.rootless: true`, then the following will occur. In case you us
|
|||||||
|
|
||||||
[see deployment.yaml](./templates/gitea/deployment.yaml) template inside container "env" declarations
|
[see deployment.yaml](./templates/gitea/deployment.yaml) template inside container "env" declarations
|
||||||
|
|
||||||
|
#### Session, Cache and Queue
|
||||||
|
|
||||||
|
The session, cache and queue settings are set to use the built-in Redis Cluster sub-chart dependency.
|
||||||
|
If Redis Cluster is disabled, the chart will fall back to the Gitea defaults which use "memory" for `session` and `cache` and "level" for `queue`.
|
||||||
|
|
||||||
|
While these will work and even not cause immediate issues after startup, **they are not recommended for production use**.
|
||||||
|
Reasons being that a single pod will take on all the work for `session` and `cache` tasks in its available memory.
|
||||||
|
It is likely that the pod will run out of memory or will face substantial memory spikes, depending on the workload.
|
||||||
|
External tools such as `redis-cluster` or `memcached` handle these workloads much better.
|
||||||
|
|
||||||
### Single-Pod Configurations
|
### Single-Pod Configurations
|
||||||
|
|
||||||
If HA is not needed/desired, the following configurations can be used to deploy a single-pod Gitea instance.
|
If HA is not needed/desired, the following configurations can be used to deploy a single-pod Gitea instance.
|
||||||
@ -1051,6 +1094,22 @@ If you miss this, blindly upgrading may delete your Postgres instance and you ma
|
|||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
|
<summary>To 10.0.0</summary>
|
||||||
|
|
||||||
|
<!-- prettier-ignore-start -->
|
||||||
|
<!-- markdownlint-disable-next-line -->
|
||||||
|
**Breaking changes**
|
||||||
|
<!-- prettier-ignore-end -->
|
||||||
|
|
||||||
|
- Update PostgreSQL sub-chart dependencies to appVersion 16.x
|
||||||
|
- Update to sub-charts versioning approach: Users are encouraged to pin the version tag of the sub-chart dependencies to a major appVersion.
|
||||||
|
This avoids issues during chart upgrades and allows to incorporate new sub-chart versions as they are released.
|
||||||
|
Please see the new [README section describing the versioning approach for sub-chart versions](#dependency-versioning).
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
|
||||||
<summary>To 9.6.0</summary>
|
<summary>To 9.6.0</summary>
|
||||||
|
|
||||||
Chart 9.6.0 ships with Gitea 1.21.0.
|
Chart 9.6.0 ships with Gitea 1.21.0.
|
||||||
|
65
package-lock.json
generated
65
package-lock.json
generated
@ -8,7 +8,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@bitnami/readme-generator-for-helm": "^2.5.0",
|
"@bitnami/readme-generator-for-helm": "^2.5.0",
|
||||||
"markdownlint-cli": "^0.37.0"
|
"markdownlint-cli": "^0.38.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.0.0",
|
"node": ">=16.0.0",
|
||||||
@ -261,9 +261,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ignore": {
|
"node_modules/ignore": {
|
||||||
"version": "5.2.4",
|
"version": "5.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz",
|
||||||
"integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
|
"integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 4"
|
"node": ">= 4"
|
||||||
@ -310,9 +310,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/jackspeak": {
|
"node_modules/jackspeak": {
|
||||||
"version": "2.2.0",
|
"version": "2.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz",
|
||||||
"integrity": "sha512-r5XBrqIJfwRIjRt/Xr5fv9Wh09qyhHfKnYddDlpM+ibRR20qrYActpCAgU6U+d53EOEjzkvxPMVHSlgR7leXrQ==",
|
"integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@isaacs/cliui": "^8.0.2"
|
"@isaacs/cliui": "^8.0.2"
|
||||||
@ -370,9 +370,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/markdown-it": {
|
"node_modules/markdown-it": {
|
||||||
"version": "13.0.1",
|
"version": "13.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.2.tgz",
|
||||||
"integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==",
|
"integrity": "sha512-FtwnEuuK+2yVU7goGn/MJ0WBZMM9ZPgU9spqlFs7/A/pDIUNSOQZhUgOqYCficIuR2QaFnrt8LHqBWsbTAoI5w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"argparse": "^2.0.1",
|
"argparse": "^2.0.1",
|
||||||
@ -399,31 +399,34 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/markdownlint": {
|
"node_modules/markdownlint": {
|
||||||
"version": "0.31.1",
|
"version": "0.32.1",
|
||||||
"resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.31.1.tgz",
|
"resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.32.1.tgz",
|
||||||
"integrity": "sha512-CKMR2hgcIBrYlIUccDCOvi966PZ0kJExDrUi1R+oF9PvqQmCrTqjOsgIvf2403OmJ+CWomuzDoylr6KbuMyvHA==",
|
"integrity": "sha512-3sx9xpi4xlHlokGyHO9k0g3gJbNY4DI6oNEeEYq5gQ4W7UkiJ90VDAnuDl2U+yyXOUa6BX+0gf69ZlTUGIBp6A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"markdown-it": "13.0.1",
|
"markdown-it": "13.0.2",
|
||||||
"markdownlint-micromark": "0.1.7"
|
"markdownlint-micromark": "0.1.7"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/DavidAnson"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/markdownlint-cli": {
|
"node_modules/markdownlint-cli": {
|
||||||
"version": "0.37.0",
|
"version": "0.38.0",
|
||||||
"resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.37.0.tgz",
|
"resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.38.0.tgz",
|
||||||
"integrity": "sha512-hNKAc0bWBBuVhJbSWbUhRzavstiB4o1jh3JeSpwC4/dt6eJ54lRfYHRxVdzVp4qGWBKbeE6Pg490PFEfrKjqSg==",
|
"integrity": "sha512-qkZRKJ4LVq6CJIkRIuJsEHvhWhm+FP0E7yhHvOMrrgdykgFWNYD4wuhZTjvigbJLTKPooP79yPiUDDZBCBI5JA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"commander": "~11.0.0",
|
"commander": "~11.1.0",
|
||||||
"get-stdin": "~9.0.0",
|
"get-stdin": "~9.0.0",
|
||||||
"glob": "~10.3.4",
|
"glob": "~10.3.10",
|
||||||
"ignore": "~5.2.4",
|
"ignore": "~5.3.0",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"jsonc-parser": "~3.2.0",
|
"jsonc-parser": "~3.2.0",
|
||||||
"markdownlint": "~0.31.1",
|
"markdownlint": "~0.32.1",
|
||||||
"minimatch": "~9.0.3",
|
"minimatch": "~9.0.3",
|
||||||
"run-con": "~1.3.2"
|
"run-con": "~1.3.2"
|
||||||
},
|
},
|
||||||
@ -431,7 +434,7 @@
|
|||||||
"markdownlint": "markdownlint.js"
|
"markdownlint": "markdownlint.js"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/markdownlint-cli/node_modules/brace-expansion": {
|
"node_modules/markdownlint-cli/node_modules/brace-expansion": {
|
||||||
@ -444,28 +447,28 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/markdownlint-cli/node_modules/commander": {
|
"node_modules/markdownlint-cli/node_modules/commander": {
|
||||||
"version": "11.0.0",
|
"version": "11.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/commander/-/commander-11.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz",
|
||||||
"integrity": "sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==",
|
"integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=16"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/markdownlint-cli/node_modules/glob": {
|
"node_modules/markdownlint-cli/node_modules/glob": {
|
||||||
"version": "10.3.5",
|
"version": "10.3.10",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
|
||||||
"integrity": "sha512-bYUpUD7XDEHI4Q2O5a7PXGvyw4deKR70kHiDxzQbe925wbZknhOzUt2xBgTkYL6RBcVeXYuD9iNYeqoWbBZQnA==",
|
"integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"foreground-child": "^3.1.0",
|
"foreground-child": "^3.1.0",
|
||||||
"jackspeak": "^2.0.3",
|
"jackspeak": "^2.3.5",
|
||||||
"minimatch": "^9.0.1",
|
"minimatch": "^9.0.1",
|
||||||
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
|
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
|
||||||
"path-scurry": "^1.10.1"
|
"path-scurry": "^1.10.1"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"glob": "dist/cjs/src/bin.js"
|
"glob": "dist/esm/bin.mjs"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16 || 14 >=14.17"
|
"node": ">=16 || 14 >=14.17"
|
||||||
|
@ -14,6 +14,6 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@bitnami/readme-generator-for-helm": "^2.5.0",
|
"@bitnami/readme-generator-for-helm": "^2.5.0",
|
||||||
"markdownlint-cli": "^0.37.0"
|
"markdownlint-cli": "^0.38.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,28 +6,55 @@
|
|||||||
'schedule:automergeDaily',
|
'schedule:automergeDaily',
|
||||||
'schedule:weekends',
|
'schedule:weekends',
|
||||||
],
|
],
|
||||||
labels: ['kind/dependency'],
|
labels: [
|
||||||
|
'kind/dependency',
|
||||||
|
],
|
||||||
automergeStrategy: 'squash',
|
automergeStrategy: 'squash',
|
||||||
customManagers: [
|
customManagers: [
|
||||||
{
|
{
|
||||||
description: 'Gitea-version of https://docs.renovatebot.com/presets-regexManagers/#regexmanagersgithubactionsversions',
|
description: 'Gitea-version of https://docs.renovatebot.com/presets-regexManagers/#regexmanagersgithubactionsversions',
|
||||||
customType: 'regex',
|
customType: 'regex',
|
||||||
fileMatch: ['.gitea/workflows/.+\\.ya?ml$'],
|
fileMatch: [
|
||||||
|
'.gitea/workflows/.+\\.ya?ml$',
|
||||||
|
],
|
||||||
matchStrings: [
|
matchStrings: [
|
||||||
'# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[a-z-0-9]+?))?\\s+[A-Za-z0-9_]+?_VERSION\\s*:\\s*["\']?(?<currentValue>.+?)["\']?\\s',
|
'# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[a-z-0-9]+?))?\\s+[A-Za-z0-9_]+?_VERSION\\s*:\\s*["\']?(?<currentValue>.+?)["\']?\\s',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
description: 'Detect helm-unittest yaml schema file',
|
||||||
|
customType: 'regex',
|
||||||
|
fileMatch: ['.vscode/settings\\.json$'],
|
||||||
|
matchStrings: [
|
||||||
|
'https:\\/\\/raw\\.githubusercontent\\.com\\/(?<depName>[^\\s]+?)\\/(?<currentValue>v[0-9.]+?)\\/schema\\/helm-testsuite\\.json',
|
||||||
|
],
|
||||||
|
datasourceTemplate: 'github-releases',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
packageRules: [
|
packageRules: [
|
||||||
{
|
{
|
||||||
groupName: 'subcharts (minor & patch)',
|
groupName: 'subcharts (minor & patch)',
|
||||||
matchManagers: ['helmv3'],
|
matchManagers: [
|
||||||
matchUpdateTypes: ['minor', 'patch', 'digest'],
|
'helmv3',
|
||||||
|
],
|
||||||
|
matchUpdateTypes: [
|
||||||
|
'minor',
|
||||||
|
'patch',
|
||||||
|
'digest',
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
groupName: 'workflow dependencies (minor & patch)',
|
groupName: 'workflow dependencies (minor & patch)',
|
||||||
matchManagers: ['github-actions', 'npm', 'regex'],
|
matchManagers: [
|
||||||
matchUpdateTypes: ['minor', 'patch', 'digest'],
|
'github-actions',
|
||||||
|
'npm',
|
||||||
|
'custom.regex',
|
||||||
|
],
|
||||||
|
matchUpdateTypes: [
|
||||||
|
'minor',
|
||||||
|
'patch',
|
||||||
|
'digest',
|
||||||
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
@ -18,3 +18,19 @@
|
|||||||
echo "Visit http://127.0.0.1:{{ .Values.service.http.port }} to use your application"
|
echo "Visit http://127.0.0.1:{{ .Values.service.http.port }} to use your application"
|
||||||
kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ .Release.Name }}-http {{ .Values.service.http.port }}:{{ .Values.service.http.port }}
|
kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ .Release.Name }}-http {{ .Values.service.http.port }}:{{ .Values.service.http.port }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- $warnings := list -}}
|
||||||
|
{{- if eq (get .Values.gitea.config.cache "ADAPTER") "memory" -}}
|
||||||
|
{{- $warnings = append $warnings "Gitea uses 'memory' for caching which is not recommended for production use. See https://docs.gitea.com/next/administration/config-cheat-sheet#cache-cache for available options." -}}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq (get .Values.gitea.config.queue "TYPE") "level" -}}
|
||||||
|
{{- $warnings = append $warnings "Gitea uses 'leveldb' for queue actions which is not recommended for production use. See https://docs.gitea.com/next/administration/config-cheat-sheet#queue-queue-and-queue for available options." -}}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq (get .Values.gitea.config.session "PROVIDER") "memory" -}}
|
||||||
|
{{- $warnings = append $warnings "Gitea uses 'memory' for sessions which is not recommended for production use. See https://docs.gitea.com/next/administration/config-cheat-sheet#session-session for available options." -}}
|
||||||
|
{{- end }}
|
||||||
|
{{- if gt (len $warnings) 0 }}
|
||||||
|
2. Review these warnings:
|
||||||
|
{{- range $warnings }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
@ -290,23 +290,33 @@ https
|
|||||||
{{- if not (hasKey .Values.gitea.config.metrics "ENABLED") -}}
|
{{- if not (hasKey .Values.gitea.config.metrics "ENABLED") -}}
|
||||||
{{- $_ := set .Values.gitea.config.metrics "ENABLED" .Values.gitea.metrics.enabled -}}
|
{{- $_ := set .Values.gitea.config.metrics "ENABLED" .Values.gitea.metrics.enabled -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if (index .Values "redis-cluster").enabled -}}
|
|
||||||
{{- $_ := set .Values.gitea.config.cache "ENABLED" "true" -}}
|
|
||||||
{{- $_ := set .Values.gitea.config.cache "ADAPTER" "redis" -}}
|
|
||||||
{{- if not (.Values.gitea.config.cache.HOST) -}}
|
|
||||||
{{- $_ := set .Values.gitea.config.cache "HOST" (include "redis.dns" .) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- /* redis queue */ -}}
|
{{- /* redis queue */ -}}
|
||||||
{{- if (index .Values "redis-cluster").enabled -}}
|
{{- if (index .Values "redis-cluster").enabled -}}
|
||||||
{{- $_ := set .Values.gitea.config.queue "TYPE" "redis" -}}
|
{{- $_ := set .Values.gitea.config.queue "TYPE" "redis" -}}
|
||||||
{{- $_ := set .Values.gitea.config.queue "CONN_STR" (include "redis.dns" .) -}}
|
{{- $_ := set .Values.gitea.config.queue "CONN_STR" (include "redis.dns" .) -}}
|
||||||
{{- end -}}
|
|
||||||
{{- if not (get .Values.gitea.config.session "PROVIDER") -}}
|
|
||||||
{{- $_ := set .Values.gitea.config.session "PROVIDER" "redis" -}}
|
{{- $_ := set .Values.gitea.config.session "PROVIDER" "redis" -}}
|
||||||
{{- end -}}
|
|
||||||
{{- if not (get .Values.gitea.config.session "PROVIDER_CONFIG") -}}
|
|
||||||
{{- $_ := set .Values.gitea.config.session "PROVIDER_CONFIG" (include "redis.dns" .) -}}
|
{{- $_ := set .Values.gitea.config.session "PROVIDER_CONFIG" (include "redis.dns" .) -}}
|
||||||
|
{{- $_ := set .Values.gitea.config.cache "ADAPTER" "redis" -}}
|
||||||
|
{{- $_ := set .Values.gitea.config.cache "HOST" (include "redis.dns" .) -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- if not (get .Values.gitea.config.session "PROVIDER") -}}
|
||||||
|
{{- $_ := set .Values.gitea.config.session "PROVIDER" "memory" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if not (get .Values.gitea.config.session "PROVIDER_CONFIG") -}}
|
||||||
|
{{- $_ := set .Values.gitea.config.session "PROVIDER_CONFIG" "" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if not (get .Values.gitea.config.queue "TYPE") -}}
|
||||||
|
{{- $_ := set .Values.gitea.config.queue "TYPE" "level" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if not (get .Values.gitea.config.queue "CONN_STR") -}}
|
||||||
|
{{- $_ := set .Values.gitea.config.queue "CONN_STR" "" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if not (get .Values.gitea.config.cache "ADAPTER") -}}
|
||||||
|
{{- $_ := set .Values.gitea.config.cache "ADAPTER" "memory" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if not (get .Values.gitea.config.cache "HOST") -}}
|
||||||
|
{{- $_ := set .Values.gitea.config.cache "HOST" "" -}}
|
||||||
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if not .Values.gitea.config.indexer.ISSUE_INDEXER_TYPE -}}
|
{{- if not .Values.gitea.config.indexer.ISSUE_INDEXER_TYPE -}}
|
||||||
{{- $_ := set .Values.gitea.config.indexer "ISSUE_INDEXER_TYPE" "db" -}}
|
{{- $_ := set .Values.gitea.config.indexer "ISSUE_INDEXER_TYPE" "db" -}}
|
||||||
|
@ -174,7 +174,7 @@ stringData:
|
|||||||
}
|
}
|
||||||
|
|
||||||
# save existing envs prior to script execution. Necessary to keep order of preexisting and custom envs
|
# save existing envs prior to script execution. Necessary to keep order of preexisting and custom envs
|
||||||
env | (grep GITEA || [[ $? == 1 ]]) > /tmp/existing-envs
|
env | (grep -e '^GITEA__' || [[ $? == 1 ]]) > /tmp/existing-envs
|
||||||
|
|
||||||
# MUST BE CALLED BEFORE OTHER CONFIGURATION
|
# MUST BE CALLED BEFORE OTHER CONFIGURATION
|
||||||
env2ini::generate_initial_secrets
|
env2ini::generate_initial_secrets
|
||||||
|
@ -86,7 +86,28 @@ stringData:
|
|||||||
|
|
||||||
{{- if or .Values.gitea.admin.existingSecret (and .Values.gitea.admin.username .Values.gitea.admin.password) }}
|
{{- if or .Values.gitea.admin.existingSecret (and .Values.gitea.admin.username .Values.gitea.admin.password) }}
|
||||||
function configure_admin_user() {
|
function configure_admin_user() {
|
||||||
local ACCOUNT_ID=$(gitea admin user list --admin | grep -e "\s\+${GITEA_ADMIN_USERNAME}\s\+" | awk -F " " "{printf \$1}")
|
local full_admin_list=$(gitea admin user list --admin)
|
||||||
|
local actual_user_table=''
|
||||||
|
|
||||||
|
# We might have distorted output due to warning logs, so we have to detect the actual user table by its headline and trim output above that line
|
||||||
|
local regex="(.*)(ID\s+Username\s+Email\s+IsActive.*)"
|
||||||
|
if [[ "${full_admin_list}" =~ $regex ]]; then
|
||||||
|
actual_user_table=$(echo "${BASH_REMATCH[2]}" | tail -n+2) # tail'ing to drop the table headline
|
||||||
|
else
|
||||||
|
# This code block should never be reached, as long as the output table header remains the same.
|
||||||
|
# If this code block is reached, the regex doesn't match anymore and we probably have to adjust this script.
|
||||||
|
|
||||||
|
echo "ERROR: 'configure_admin_user' was not able to determine the current list of admin users."
|
||||||
|
echo " Please review the output of 'gitea admin user list --admin' shown below."
|
||||||
|
echo " If you think it is an issue with the Helm Chart provisioning, file an issue at https://gitea.com/gitea/helm-chart/issues."
|
||||||
|
echo "DEBUG: Output of 'gitea admin user list --admin'"
|
||||||
|
echo "--"
|
||||||
|
echo "${full_admin_list}"
|
||||||
|
echo "--"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local ACCOUNT_ID=$(echo "${actual_user_table}" | grep -E "\s+${GITEA_ADMIN_USERNAME}\s+" | awk -F " " "{printf \$1}")
|
||||||
if [[ -z "${ACCOUNT_ID}" ]]; then
|
if [[ -z "${ACCOUNT_ID}" ]]; then
|
||||||
echo "No admin user '${GITEA_ADMIN_USERNAME}' found. Creating now..."
|
echo "No admin user '${GITEA_ADMIN_USERNAME}' found. Creating now..."
|
||||||
gitea admin user create --admin --username "${GITEA_ADMIN_USERNAME}" --password "${GITEA_ADMIN_PASSWORD}" --email {{ .Values.gitea.admin.email | quote }} --must-change-password=false
|
gitea admin user create --admin --username "${GITEA_ADMIN_USERNAME}" --password "${GITEA_ADMIN_PASSWORD}" --email {{ .Values.gitea.admin.email | quote }} --must-change-password=false
|
||||||
@ -105,7 +126,28 @@ stringData:
|
|||||||
{{- if .Values.gitea.ldap }}
|
{{- if .Values.gitea.ldap }}
|
||||||
{{- range $idx, $value := .Values.gitea.ldap }}
|
{{- range $idx, $value := .Values.gitea.ldap }}
|
||||||
local LDAP_NAME={{ (printf "%s" $value.name) | squote }}
|
local LDAP_NAME={{ (printf "%s" $value.name) | squote }}
|
||||||
local GITEA_AUTH_ID=$(gitea admin auth list --vertical-bars | grep -E "\|${LDAP_NAME}\s+\|" | grep -iE '\|LDAP \(via BindDN\)\s+\|' | awk -F " " "{print \$1}")
|
local full_auth_list=$(gitea admin auth list --vertical-bars)
|
||||||
|
local actual_auth_table=''
|
||||||
|
|
||||||
|
# We might have distorted output due to warning logs, so we have to detect the actual user table by its headline and trim output above that line
|
||||||
|
local regex="(.*)(ID\s+\|Name\s+\|Type\s+\|Enabled.*)"
|
||||||
|
if [[ "${full_auth_list}" =~ $regex ]]; then
|
||||||
|
actual_auth_table=$(echo "${BASH_REMATCH[2]}" | tail -n+2) # tail'ing to drop the table headline
|
||||||
|
else
|
||||||
|
# This code block should never be reached, as long as the output table header remains the same.
|
||||||
|
# If this code block is reached, the regex doesn't match anymore and we probably have to adjust this script.
|
||||||
|
|
||||||
|
echo "ERROR: 'configure_ldap' was not able to determine the current list of authentication sources."
|
||||||
|
echo " Please review the output of 'gitea admin auth list --vertical-bars' shown below."
|
||||||
|
echo " If you think it is an issue with the Helm Chart provisioning, file an issue at https://gitea.com/gitea/helm-chart/issues."
|
||||||
|
echo "DEBUG: Output of 'gitea admin auth list --vertical-bars'"
|
||||||
|
echo "--"
|
||||||
|
echo "${full_auth_list}"
|
||||||
|
echo "--"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local GITEA_AUTH_ID=$(echo "${actual_auth_table}" | grep -E "\|${LDAP_NAME}\s+\|" | grep -iE '\|LDAP \(via BindDN\)\s+\|' | awk -F " " "{print \$1}")
|
||||||
|
|
||||||
if [[ -z "${GITEA_AUTH_ID}" ]]; then
|
if [[ -z "${GITEA_AUTH_ID}" ]]; then
|
||||||
echo "No ldap configuration found with name '${LDAP_NAME}'. Installing it now..."
|
echo "No ldap configuration found with name '${LDAP_NAME}'. Installing it now..."
|
||||||
@ -128,7 +170,28 @@ stringData:
|
|||||||
{{- if .Values.gitea.oauth }}
|
{{- if .Values.gitea.oauth }}
|
||||||
{{- range $idx, $value := .Values.gitea.oauth }}
|
{{- range $idx, $value := .Values.gitea.oauth }}
|
||||||
local OAUTH_NAME={{ (printf "%s" $value.name) | squote }}
|
local OAUTH_NAME={{ (printf "%s" $value.name) | squote }}
|
||||||
local AUTH_ID=$(gitea admin auth list --vertical-bars | grep -E "\|${OAUTH_NAME}\s+\|" | grep -iE '\|OAuth2\s+\|' | awk -F " " "{print \$1}")
|
local full_auth_list=$(gitea admin auth list --vertical-bars)
|
||||||
|
local actual_auth_table=''
|
||||||
|
|
||||||
|
# We might have distorted output due to warning logs, so we have to detect the actual user table by its headline and trim output above that line
|
||||||
|
local regex="(.*)(ID\s+\|Name\s+\|Type\s+\|Enabled.*)"
|
||||||
|
if [[ "${full_auth_list}" =~ $regex ]]; then
|
||||||
|
actual_auth_table=$(echo "${BASH_REMATCH[2]}" | tail -n+2) # tail'ing to drop the table headline
|
||||||
|
else
|
||||||
|
# This code block should never be reached, as long as the output table header remains the same.
|
||||||
|
# If this code block is reached, the regex doesn't match anymore and we probably have to adjust this script.
|
||||||
|
|
||||||
|
echo "ERROR: 'configure_oauth' was not able to determine the current list of authentication sources."
|
||||||
|
echo " Please review the output of 'gitea admin auth list --vertical-bars' shown below."
|
||||||
|
echo " If you think it is an issue with the Helm Chart provisioning, file an issue at https://gitea.com/gitea/helm-chart/issues."
|
||||||
|
echo "DEBUG: Output of 'gitea admin auth list --vertical-bars'"
|
||||||
|
echo "--"
|
||||||
|
echo "${full_auth_list}"
|
||||||
|
echo "--"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local AUTH_ID=$(echo "${actual_auth_table}" | grep -E "\|${OAUTH_NAME}\s+\|" | grep -iE '\|OAuth2\s+\|' | awk -F " " "{print \$1}")
|
||||||
|
|
||||||
if [[ -z "${AUTH_ID}" ]]; then
|
if [[ -z "${AUTH_ID}" ]]; then
|
||||||
echo "No oauth configuration found with name '${OAUTH_NAME}'. Installing it now..."
|
echo "No oauth configuration found with name '${OAUTH_NAME}'. Installing it now..."
|
||||||
|
45
unittests/config/cache-config.yaml
Normal file
45
unittests/config/cache-config.yaml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
suite: config template | cache config
|
||||||
|
release:
|
||||||
|
name: gitea-unittests
|
||||||
|
namespace: testing
|
||||||
|
tests:
|
||||||
|
- it: "cache is configured correctly for redis-cluster"
|
||||||
|
template: templates/gitea/config.yaml
|
||||||
|
set:
|
||||||
|
redis-cluster:
|
||||||
|
enabled: true
|
||||||
|
asserts:
|
||||||
|
- documentIndex: 0
|
||||||
|
equal:
|
||||||
|
path: stringData.cache
|
||||||
|
value: |-
|
||||||
|
ADAPTER=redis
|
||||||
|
HOST=redis+cluster://:@gitea-unittests-redis-cluster-headless.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s&
|
||||||
|
|
||||||
|
- it: "cache is configured correctly for 'memory' when redis-cluster is disabled"
|
||||||
|
template: templates/gitea/config.yaml
|
||||||
|
set:
|
||||||
|
redis-cluster:
|
||||||
|
enabled: false
|
||||||
|
asserts:
|
||||||
|
- documentIndex: 0
|
||||||
|
equal:
|
||||||
|
path: stringData.cache
|
||||||
|
value: |-
|
||||||
|
ADAPTER=memory
|
||||||
|
HOST=
|
||||||
|
|
||||||
|
- it: "cache can be customized when redis-cluster is disabled"
|
||||||
|
template: templates/gitea/config.yaml
|
||||||
|
set:
|
||||||
|
redis-cluster:
|
||||||
|
enabled: false
|
||||||
|
gitea.config.cache.ADAPTER: custom-adapter
|
||||||
|
gitea.config.cache.HOST: custom-host
|
||||||
|
asserts:
|
||||||
|
- documentIndex: 0
|
||||||
|
equal:
|
||||||
|
path: stringData.cache
|
||||||
|
value: |-
|
||||||
|
ADAPTER=custom-adapter
|
||||||
|
HOST=custom-host
|
45
unittests/config/queue-config.yaml
Normal file
45
unittests/config/queue-config.yaml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
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
|
45
unittests/config/session-config.yaml
Normal file
45
unittests/config/session-config.yaml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
suite: config template | session config
|
||||||
|
release:
|
||||||
|
name: gitea-unittests
|
||||||
|
namespace: testing
|
||||||
|
tests:
|
||||||
|
- it: "session is configured correctly for redis-cluster"
|
||||||
|
template: templates/gitea/config.yaml
|
||||||
|
set:
|
||||||
|
redis-cluster:
|
||||||
|
enabled: true
|
||||||
|
asserts:
|
||||||
|
- documentIndex: 0
|
||||||
|
equal:
|
||||||
|
path: stringData.session
|
||||||
|
value: |-
|
||||||
|
PROVIDER=redis
|
||||||
|
PROVIDER_CONFIG=redis+cluster://:@gitea-unittests-redis-cluster-headless.testing.svc.cluster.local:6379/0?pool_size=100&idle_timeout=180s&
|
||||||
|
|
||||||
|
- it: "session is configured correctly for 'memory' when redis-cluster is disabled"
|
||||||
|
template: templates/gitea/config.yaml
|
||||||
|
set:
|
||||||
|
redis-cluster:
|
||||||
|
enabled: false
|
||||||
|
asserts:
|
||||||
|
- documentIndex: 0
|
||||||
|
equal:
|
||||||
|
path: stringData.session
|
||||||
|
value: |-
|
||||||
|
PROVIDER=memory
|
||||||
|
PROVIDER_CONFIG=
|
||||||
|
|
||||||
|
- it: "session can be customized when redis-cluster is disabled"
|
||||||
|
template: templates/gitea/config.yaml
|
||||||
|
set:
|
||||||
|
redis-cluster:
|
||||||
|
enabled: false
|
||||||
|
gitea.config.session.PROVIDER: custom-provider
|
||||||
|
gitea.config.session.PROVIDER_CONFIG: custom-provider-config
|
||||||
|
asserts:
|
||||||
|
- documentIndex: 0
|
||||||
|
equal:
|
||||||
|
path: stringData.session
|
||||||
|
value: |-
|
||||||
|
PROVIDER=custom-provider
|
||||||
|
PROVIDER_CONFIG=custom-provider-config
|
42
unittests/dependency-major-image-check.yaml
Normal file
42
unittests/dependency-major-image-check.yaml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
suite: Dependency update consistency
|
||||||
|
release:
|
||||||
|
name: gitea-unittests
|
||||||
|
namespace: testing
|
||||||
|
tests:
|
||||||
|
- it: "[postgresql-ha] ensures we detect major image version upgrades"
|
||||||
|
template: charts/postgresql-ha/templates/postgresql/statefulset.yaml
|
||||||
|
set:
|
||||||
|
postgresql:
|
||||||
|
enabled: false
|
||||||
|
postgresql-ha:
|
||||||
|
enabled: true
|
||||||
|
asserts:
|
||||||
|
- documentIndex: 0
|
||||||
|
matchRegex:
|
||||||
|
path: spec.template.spec.containers[0].image
|
||||||
|
# IN CASE OF AN INTENTIONAL MAJOR BUMP, ADJUST THIS TEST
|
||||||
|
pattern: ^docker.io/bitnami/postgresql-repmgr:16.+$
|
||||||
|
- it: "[postgresql] ensures we detect major image version upgrades"
|
||||||
|
template: charts/postgresql/templates/primary/statefulset.yaml
|
||||||
|
set:
|
||||||
|
postgresql:
|
||||||
|
enabled: true
|
||||||
|
postgresql-ha:
|
||||||
|
enabled: false
|
||||||
|
asserts:
|
||||||
|
- documentIndex: 0
|
||||||
|
matchRegex:
|
||||||
|
path: spec.template.spec.containers[0].image
|
||||||
|
# IN CASE OF AN INTENTIONAL MAJOR BUMP, ADJUST THIS TEST
|
||||||
|
pattern: ^docker.io/bitnami/postgresql:16.+$
|
||||||
|
- it: "[redis-cluster] ensures we detect major image version upgrades"
|
||||||
|
template: charts/redis-cluster/templates/redis-statefulset.yaml
|
||||||
|
set:
|
||||||
|
redis-cluster:
|
||||||
|
enabled: true
|
||||||
|
asserts:
|
||||||
|
- documentIndex: 0
|
||||||
|
matchRegex:
|
||||||
|
path: spec.template.spec.containers[0].image
|
||||||
|
# IN CASE OF AN INTENTIONAL MAJOR BUMP, ADJUST THIS TEST
|
||||||
|
pattern: ^docker.io/bitnami/redis-cluster:7.+$
|
@ -33,7 +33,7 @@ tests:
|
|||||||
kind: Secret
|
kind: Secret
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
name: gitea-unittests-gpg-key
|
name: gitea-unittests-gpg-key
|
||||||
- isNotEmpty:
|
- isNotNullOrEmpty:
|
||||||
path: metadata.labels
|
path: metadata.labels
|
||||||
- equal:
|
- equal:
|
||||||
path: data.privateKey
|
path: data.privateKey
|
||||||
|
Reference in New Issue
Block a user