Compare commits
69 Commits
Author | SHA1 | Date | |
---|---|---|---|
b7b60dd51f | |||
22848d0ce7 | |||
157e87593d | |||
f897e6350b | |||
21bc9a548b | |||
b13063ad7a | |||
4d62136a3d | |||
548f932422 | |||
dc30c66d25 | |||
0b2f3d6eb9 | |||
dd304c1c1a | |||
4f4c71fb39 | |||
509ee975c4 | |||
15385d02ee | |||
617c773b7e | |||
42937062d9 | |||
a91624b52d | |||
b768ded932 | |||
fd8246e51d | |||
20b14b01c1 | |||
74bae066c4 | |||
2f809390be | |||
153a664138 | |||
0135b10295 | |||
2a9273d32f | |||
3b2b700441 | |||
7fa896a0ce | |||
d2bfa0250d | |||
2d77b626ac | |||
6644c1701b | |||
a3fafc90a8 | |||
ceb6de12a8 | |||
ab5ec8ddb9 | |||
d65737681a | |||
8ee589a56f | |||
a82540e7eb | |||
0794fe5b8b | |||
3ac530f66d | |||
00fbf45f03 | |||
4d339bb05b | |||
829bca241d | |||
6be4f8bb97 | |||
aeea86b26a | |||
4ed7818ec2 | |||
b84a431854 | |||
a1af5eab4e | |||
f5ad4eb33d | |||
5dfaca13f2 | |||
70e5da077a | |||
d7cba5443f | |||
e9d401a9ee | |||
7b7789e65d | |||
8a191f0eca | |||
469eacaf1c | |||
f0d0c00ed6 | |||
323bcd7526 | |||
59b246302b | |||
223069d042 | |||
060945a486 | |||
ff932a0bf9 | |||
88a1650ce4 | |||
d875809299 | |||
a1d9059e53 | |||
7e403d5ef6 | |||
0081cabe0b | |||
b265d87f55 | |||
8bcd2dc63b | |||
34c1212939 | |||
5c4bcaa1e3 |
@ -7,7 +7,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
# renovate: datasource=docker depName=alpine/helm
|
# renovate: datasource=docker depName=alpine/helm
|
||||||
HELM_VERSION: "3.13.2"
|
HELM_VERSION: "3.15.1"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generate-chart-publish:
|
generate-chart-publish:
|
||||||
@ -19,20 +19,23 @@ jobs:
|
|||||||
apt update -y
|
apt update -y
|
||||||
apt install -y curl ca-certificates curl gnupg
|
apt install -y curl ca-certificates curl gnupg
|
||||||
# helm
|
# helm
|
||||||
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | tee /usr/share/keyrings/helm.gpg > /dev/null
|
curl -O https://get.helm.sh/helm-v${{ env.HELM_VERSION }}-linux-amd64.tar.gz
|
||||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | tee /etc/apt/sources.list.d/helm-stable-debian.list
|
tar -xzf helm-v${{ env.HELM_VERSION }}-linux-amd64.tar.gz
|
||||||
|
mv linux-amd64/helm /usr/local/bin/
|
||||||
|
rm -rf linux-amd64 helm-v${{ env.HELM_VERSION }}-linux-amd64.tar.gz
|
||||||
|
helm version
|
||||||
# docker
|
# docker
|
||||||
install -m 0755 -d /etc/apt/keyrings
|
install -m 0755 -d /etc/apt/keyrings
|
||||||
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||||
chmod a+r /etc/apt/keyrings/docker.gpg
|
chmod a+r /etc/apt/keyrings/docker.gpg
|
||||||
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install -y python helm=${{ env.HELM_VERSION }}-1 python3-pip apt-transport-https docker-ce-cli
|
apt install -y python3 python3-pip apt-transport-https docker-ce-cli
|
||||||
pip install awscli
|
pip install awscli
|
||||||
|
|
||||||
- name: Import GPG key
|
- name: Import GPG key
|
||||||
id: import_gpg
|
id: import_gpg
|
||||||
uses: https://github.com/crazy-max/ghaction-import-gpg@v5
|
uses: https://github.com/crazy-max/ghaction-import-gpg@v6
|
||||||
with:
|
with:
|
||||||
gpg_private_key: ${{ secrets.GPGSIGN_KEY }}
|
gpg_private_key: ${{ secrets.GPGSIGN_KEY }}
|
||||||
passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }}
|
passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }}
|
||||||
@ -44,7 +47,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
|
||||||
@ -57,7 +60,7 @@ jobs:
|
|||||||
helm registry logout registry-1.docker.io
|
helm registry logout registry-1.docker.io
|
||||||
|
|
||||||
- name: aws credential configure
|
- name: aws credential configure
|
||||||
uses: https://github.com/aws-actions/configure-aws-credentials@v2
|
uses: https://github.com/aws-actions/configure-aws-credentials@v4
|
||||||
with:
|
with:
|
||||||
aws-access-key-id: ${{ secrets.AWS_KEY_ID }}
|
aws-access-key-id: ${{ secrets.AWS_KEY_ID }}
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
@ -11,12 +11,12 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
# renovate: datasource=github-releases depName=helm-unittest/helm-unittest
|
# renovate: datasource=github-releases depName=helm-unittest/helm-unittest
|
||||||
HELM_UNITTEST_VERSION: "v0.3.6"
|
HELM_UNITTEST_VERSION: "v0.5.1"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-and-test:
|
check-and-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: alpine/helm:3.13.2
|
container: alpine/helm:3.15.1
|
||||||
steps:
|
steps:
|
||||||
- name: install tools
|
- name: install tools
|
||||||
run: |
|
run: |
|
||||||
|
@ -73,7 +73,7 @@ MD022:
|
|||||||
# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
|
# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
|
||||||
MD024:
|
MD024:
|
||||||
# Only check sibling headings
|
# Only check sibling headings
|
||||||
allow_different_nesting: true
|
siblings_only: true
|
||||||
|
|
||||||
# MD025/single-title/single-h1 - Multiple top-level headings in the same document
|
# MD025/single-title/single-h1 - Multiple top-level headings in the same document
|
||||||
MD025:
|
MD025:
|
||||||
|
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.5.1/schema/helm-testsuite.json": [
|
||||||
"/unittests/**/*.yaml"
|
"/unittests/**/*.yaml"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
1
CODEOWNERS
Normal file
1
CODEOWNERS
Normal file
@ -0,0 +1 @@
|
|||||||
|
* @justusbunsi @pat-s
|
10
Chart.lock
10
Chart.lock
@ -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: 15.5.0
|
||||||
- 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: 14.1.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: 10.2.0
|
||||||
digest: sha256:6bda620320a05a5ea4efb4189a86d30092aeb0a6f3e0009538f4bea312af0863
|
digest: sha256:f7feb678e253951354014684cca973ce7656aa8fd812e627534257dad7765069
|
||||||
generated: "2023-11-14T00:08:15.790217865Z"
|
generated: "2024-06-01T00:49:20.470701261Z"
|
||||||
|
@ -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.22.0
|
||||||
icon: https://gitea.com/assets/img/logo.svg
|
icon: https://gitea.com/assets/img/logo.svg
|
||||||
|
|
||||||
keywords:
|
keywords:
|
||||||
@ -31,20 +31,19 @@ maintainers:
|
|||||||
- name: Patrick Schratz
|
- name: Patrick Schratz
|
||||||
email: patrick.schratz@gmail.com
|
email: patrick.schratz@gmail.com
|
||||||
|
|
||||||
# Bitnami charts are served from GitHub CDN - See https://github.com/bitnami/charts/issues/10539 for details
|
|
||||||
dependencies:
|
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: 15.5.0
|
||||||
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: 14.1.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
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 9.1.3
|
version: 10.2.0
|
||||||
condition: redis-cluster.enabled
|
condition: redis-cluster.enabled
|
||||||
|
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:
|
||||||
|
81
README.md
81
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)
|
||||||
@ -46,7 +50,7 @@
|
|||||||
- [ReadinessProbe](#readinessprobe)
|
- [ReadinessProbe](#readinessprobe)
|
||||||
- [StartupProbe](#startupprobe)
|
- [StartupProbe](#startupprobe)
|
||||||
- [redis-cluster](#redis-cluster)
|
- [redis-cluster](#redis-cluster)
|
||||||
- [PostgreSQL-ha](#postgresql-ha)
|
- [PostgreSQL HA](#postgresql-ha)
|
||||||
- [PostgreSQL](#postgresql)
|
- [PostgreSQL](#postgresql)
|
||||||
- [Advanced](#advanced)
|
- [Advanced](#advanced)
|
||||||
- [Contributing](#contributing)
|
- [Contributing](#contributing)
|
||||||
@ -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.
|
||||||
@ -845,6 +888,7 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
|
|||||||
| `service.http.ipFamilies` | HTTP service dual-stack familiy selection,for dual-stack parameters see official kubernetes [dual-stack concept documentation](https://kubernetes.io/docs/concepts/services-networking/dual-stack/). | `nil` |
|
| `service.http.ipFamilies` | HTTP service dual-stack familiy selection,for dual-stack parameters see official kubernetes [dual-stack concept documentation](https://kubernetes.io/docs/concepts/services-networking/dual-stack/). | `nil` |
|
||||||
| `service.http.loadBalancerSourceRanges` | Source range filter for http loadbalancer | `[]` |
|
| `service.http.loadBalancerSourceRanges` | Source range filter for http loadbalancer | `[]` |
|
||||||
| `service.http.annotations` | HTTP service annotations | `{}` |
|
| `service.http.annotations` | HTTP service annotations | `{}` |
|
||||||
|
| `service.http.labels` | HTTP service additional labels | `{}` |
|
||||||
| `service.ssh.type` | Kubernetes service type for ssh traffic | `ClusterIP` |
|
| `service.ssh.type` | Kubernetes service type for ssh traffic | `ClusterIP` |
|
||||||
| `service.ssh.port` | Port number for ssh traffic | `22` |
|
| `service.ssh.port` | Port number for ssh traffic | `22` |
|
||||||
| `service.ssh.clusterIP` | ClusterIP setting for ssh autosetup for deployment is None | `None` |
|
| `service.ssh.clusterIP` | ClusterIP setting for ssh autosetup for deployment is None | `None` |
|
||||||
@ -857,6 +901,7 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
|
|||||||
| `service.ssh.hostPort` | HostPort for ssh service | `nil` |
|
| `service.ssh.hostPort` | HostPort for ssh service | `nil` |
|
||||||
| `service.ssh.loadBalancerSourceRanges` | Source range filter for ssh loadbalancer | `[]` |
|
| `service.ssh.loadBalancerSourceRanges` | Source range filter for ssh loadbalancer | `[]` |
|
||||||
| `service.ssh.annotations` | SSH service annotations | `{}` |
|
| `service.ssh.annotations` | SSH service annotations | `{}` |
|
||||||
|
| `service.ssh.labels` | SSH service additional labels | `{}` |
|
||||||
|
|
||||||
### Ingress
|
### Ingress
|
||||||
|
|
||||||
@ -934,7 +979,7 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
|
|||||||
| ------------------------ | ----------------------------------------------------------------- | ------------------ |
|
| ------------------------ | ----------------------------------------------------------------- | ------------------ |
|
||||||
| `signing.enabled` | Enable commit/action signing | `false` |
|
| `signing.enabled` | Enable commit/action signing | `false` |
|
||||||
| `signing.gpgHome` | GPG home directory | `/data/git/.gnupg` |
|
| `signing.gpgHome` | GPG home directory | `/data/git/.gnupg` |
|
||||||
| `signing.privateKey` | Inline private gpg key for signed Gitea actions | `""` |
|
| `signing.privateKey` | Inline private gpg key for signed internal Git activity | `""` |
|
||||||
| `signing.existingSecret` | Use an existing secret to store the value of `signing.privateKey` | `""` |
|
| `signing.existingSecret` | Use an existing secret to store the value of `signing.privateKey` | `""` |
|
||||||
|
|
||||||
### Gitea
|
### Gitea
|
||||||
@ -1001,11 +1046,11 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
|
|||||||
| `redis-cluster.cluster.nodes` | Number of redis cluster master nodes | `3` |
|
| `redis-cluster.cluster.nodes` | Number of redis cluster master nodes | `3` |
|
||||||
| `redis-cluster.cluster.replicas` | Number of redis cluster master node replicas | `0` |
|
| `redis-cluster.cluster.replicas` | Number of redis cluster master node replicas | `0` |
|
||||||
|
|
||||||
### PostgreSQL-ha
|
### PostgreSQL HA
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| ------------------------------------------- | ---------------------------------------------------------------- | ----------- |
|
| ------------------------------------------- | ---------------------------------------------------------------- | ----------- |
|
||||||
| `postgresql-ha.enabled` | Enable PostgreSQL-ha | `true` |
|
| `postgresql-ha.enabled` | Enable PostgreSQL HA | `true` |
|
||||||
| `postgresql-ha.postgresql.password` | Password for the `gitea` user (overrides `auth.password`) | `changeme4` |
|
| `postgresql-ha.postgresql.password` | Password for the `gitea` user (overrides `auth.password`) | `changeme4` |
|
||||||
| `postgresql-ha.global.postgresql.database` | Name for a custom database to create (overrides `auth.database`) | `gitea` |
|
| `postgresql-ha.global.postgresql.database` | Name for a custom database to create (overrides `auth.database`) | `gitea` |
|
||||||
| `postgresql-ha.global.postgresql.username` | Name for a custom user to create (overrides `auth.username`) | `gitea` |
|
| `postgresql-ha.global.postgresql.username` | Name for a custom user to create (overrides `auth.username`) | `gitea` |
|
||||||
@ -1014,7 +1059,7 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
|
|||||||
| `postgresql-ha.postgresql.postgresPassword` | postgres Password | `changeme1` |
|
| `postgresql-ha.postgresql.postgresPassword` | postgres Password | `changeme1` |
|
||||||
| `postgresql-ha.pgpool.adminPassword` | pgpool adminPassword | `changeme3` |
|
| `postgresql-ha.pgpool.adminPassword` | pgpool adminPassword | `changeme3` |
|
||||||
| `postgresql-ha.service.ports.postgresql` | PostgreSQL service port (overrides `service.ports.postgresql`) | `5432` |
|
| `postgresql-ha.service.ports.postgresql` | PostgreSQL service port (overrides `service.ports.postgresql`) | `5432` |
|
||||||
| `postgresql-ha.primary.persistence.size` | PVC Storage Request for PostgreSQL-ha volume | `10Gi` |
|
| `postgresql-ha.primary.persistence.size` | PVC Storage Request for PostgreSQL HA volume | `10Gi` |
|
||||||
|
|
||||||
### PostgreSQL
|
### PostgreSQL
|
||||||
|
|
||||||
@ -1051,6 +1096,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.
|
||||||
|
212
package-lock.json
generated
212
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -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.41.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 }}
|
||||||
|
@ -3,26 +3,6 @@
|
|||||||
Expand the name of the chart.
|
Expand the name of the chart.
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{- /* multiple replicas assertions */ -}}
|
|
||||||
{{- if gt .Values.replicaCount 1.0 -}}
|
|
||||||
{{- fail "When using multiple replicas, a RWX file system is required" -}}
|
|
||||||
{{- if eq (get (.Values.persistence.accessModes 0) "ReadWriteOnce") -}}
|
|
||||||
{{- fail "When using multiple replicas, a RWX file system is required" -}}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- if eq (get .Values.gitea.config.indexer "ISSUE_INDEXER_TYPE") "bleve" -}}
|
|
||||||
{{- fail "When using multiple replicas, the repo indexer must be set to 'meilisearch' or 'elasticsearch'" -}}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- if and (eq .Values.gitea.config.indexer.REPO_INDEXER_TYPE "bleve") (eq .Values.gitea.config.indexer.REPO_INDEXER_ENABLED "true") -}}
|
|
||||||
{{- fail "When using multiple replicas, the repo indexer must be set to 'meilisearch' or 'elasticsearch'" -}}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- if eq .Values.gitea.config.indexer.ISSUE_INDEXER_TYPE "bleve" -}}
|
|
||||||
{{- (printf "DEBUG: When using multiple replicas, the repo indexer must be set to 'meilisearch' or 'elasticsearch'") | fail -}}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- define "gitea.name" -}}
|
{{- define "gitea.name" -}}
|
||||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@ -60,7 +40,7 @@ Create image name and tag used by the deployment.
|
|||||||
{{- $registry := .Values.global.imageRegistry | default .Values.image.registry -}}
|
{{- $registry := .Values.global.imageRegistry | default .Values.image.registry -}}
|
||||||
{{- $repository := .Values.image.repository -}}
|
{{- $repository := .Values.image.repository -}}
|
||||||
{{- $separator := ":" -}}
|
{{- $separator := ":" -}}
|
||||||
{{- $tag := .Values.image.tag | default .Chart.AppVersion -}}
|
{{- $tag := .Values.image.tag | default .Chart.AppVersion | toString -}}
|
||||||
{{- $rootless := ternary "-rootless" "" (.Values.image.rootless) -}}
|
{{- $rootless := ternary "-rootless" "" (.Values.image.rootless) -}}
|
||||||
{{- $digest := "" -}}
|
{{- $digest := "" -}}
|
||||||
{{- if .Values.image.digest }}
|
{{- if .Values.image.digest }}
|
||||||
@ -94,7 +74,7 @@ imagePullSecrets:
|
|||||||
Storage Class
|
Storage Class
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "gitea.persistence.storageClass" -}}
|
{{- define "gitea.persistence.storageClass" -}}
|
||||||
{{- $storageClass := .Values.global.storageClass | default .Values.persistence.storageClass }}
|
{{- $storageClass := (tpl ( default "" .Values.persistence.storageClass) .) | default (tpl ( default "" .Values.global.storageClass) .) }}
|
||||||
{{- if $storageClass }}
|
{{- if $storageClass }}
|
||||||
storageClassName: {{ $storageClass | quote }}
|
storageClassName: {{ $storageClass | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@ -290,23 +270,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" -}}
|
||||||
|
@ -18,35 +18,40 @@ type: Opaque
|
|||||||
stringData:
|
stringData:
|
||||||
assertions: |
|
assertions: |
|
||||||
|
|
||||||
{{- /*assert that only one PG dep is enabled */ -}}
|
{{- /*assert that only one PG dep is enabled */ -}}
|
||||||
{{- if and (.Values.postgresql.enabled) (index .Values "postgresql-ha" "enabled") -}}
|
{{- if and (.Values.postgresql.enabled) (index .Values "postgresql-ha" "enabled") -}}
|
||||||
{{- fail "Only one of postgresql or postgresql-ha can be enabled at the same time." -}}
|
{{- fail "Only one of postgresql or postgresql-ha can be enabled at the same time." -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- /* multiple replicas assertions */ -}}
|
{{- /* multiple replicas assertions */ -}}
|
||||||
{{- if gt .Values.replicaCount 1.0 -}}
|
{{- if gt .Values.replicaCount 1.0 -}}
|
||||||
{{- if (get (get .Values.gitea.config "cron.GIT_GC_REPOS") "ENABLED") -}}
|
{{- if .Values.gitea.config.cron -}}
|
||||||
{{- fail "Invoking the garbage collector via CRON is not yet supported when running with multiple replicas. Please set 'cron.GIT_GC_REPOS.enabled = false'." -}}
|
{{- if .Values.gitea.config.cron.GIT_GC_REPOS -}}
|
||||||
{{- end }}
|
{{- 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'." }}
|
||||||
{{- if eq (first .Values.persistence.accessModes) "ReadWriteOnce" -}}
|
{{- end }}
|
||||||
{{- fail "When using multiple replicas, a RWX file system is required and gitea.persistence.accessModes[0] must be set to ReadWriteMany." -}}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- if eq (get .Values.gitea.config.indexer "ISSUE_INDEXER_TYPE") "bleve" -}}
|
|
||||||
{{- fail "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)." -}}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.gitea.config.indexer.REPO_INDEXER_TYPE -}}
|
|
||||||
{{- if eq (get .Values.gitea.config.indexer "REPO_INDEXER_TYPE") "bleve" -}}
|
|
||||||
{{- if .Values.gitea.config.indexer.REPO_INDEXER_ENABLED -}}
|
|
||||||
{{- if eq (get .Values.gitea.config.indexer "REPO_INDEXER_ENABLED") "true" -}}
|
|
||||||
{{- fail "When using multiple replicas, the repo indexer (gitea.config.indexer.REPO_INDEXER_TYPE) must be set to 'meilisearch' or 'elasticsearch' or disabled." -}}
|
|
||||||
{{- end }}
|
{{- 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." -}}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.gitea.config.indexer -}}
|
||||||
|
{{- if eq .Values.gitea.config.indexer.ISSUE_INDEXER_TYPE "bleve" -}}
|
||||||
|
{{- fail "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)." -}}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.gitea.config.indexer.REPO_INDEXER_TYPE -}}
|
||||||
|
{{- if eq .Values.gitea.config.indexer.REPO_INDEXER_TYPE "bleve" -}}
|
||||||
|
{{- if .Values.gitea.config.indexer.REPO_INDEXER_ENABLED -}}
|
||||||
|
{{- if eq .Values.gitea.config.indexer.REPO_INDEXER_ENABLED true -}}
|
||||||
|
{{- fail "When using multiple replicas, the repo indexer (gitea.config.indexer.REPO_INDEXER_TYPE) must be set to 'meilisearch' or 'elasticsearch' or disabled." -}}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- end }}
|
|
||||||
config_environment.sh: |-
|
config_environment.sh: |-
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@ -174,7 +179,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
|
||||||
|
@ -8,6 +8,9 @@ metadata:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
|
{{- if .Values.deployment.labels }}
|
||||||
|
{{- toYaml .Values.deployment.labels | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
replicas: {{ .Values.replicaCount }}
|
replicas: {{ .Values.replicaCount }}
|
||||||
strategy:
|
strategy:
|
||||||
@ -397,4 +400,4 @@ spec:
|
|||||||
{{- else if not .Values.persistence.enabled }}
|
{{- else if not .Values.persistence.enabled }}
|
||||||
- name: data
|
- name: data
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- end }}
|
{{- end }}
|
@ -4,6 +4,9 @@ metadata:
|
|||||||
name: {{ include "gitea.fullname" . }}-http
|
name: {{ include "gitea.fullname" . }}-http
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
|
{{- if .Values.service.http.labels }}
|
||||||
|
{{- toYaml .Values.service.http.labels | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- toYaml .Values.service.http.annotations | nindent 4 }}
|
{{- toYaml .Values.service.http.annotations | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
|
@ -21,7 +21,7 @@ metadata:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- if .Values.ingress.className }}
|
{{- if .Values.ingress.className }}
|
||||||
ingressClassName: {{ .Values.ingress.className }}
|
ingressClassName: {{ tpl .Values.ingress.className . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.ingress.tls }}
|
{{- if .Values.ingress.tls }}
|
||||||
tls:
|
tls:
|
||||||
|
@ -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..."
|
||||||
|
@ -6,6 +6,8 @@ metadata:
|
|||||||
namespace: {{ $.Release.Namespace }}
|
namespace: {{ $.Release.Namespace }}
|
||||||
annotations:
|
annotations:
|
||||||
{{ .Values.persistence.annotations | toYaml | indent 4}}
|
{{ .Values.persistence.annotations | toYaml | indent 4}}
|
||||||
|
labels:
|
||||||
|
{{ .Values.persistence.labels | toYaml | indent 4}}
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
{{- if gt .Values.replicaCount 1.0 }}
|
{{- if gt .Values.replicaCount 1.0 }}
|
||||||
@ -14,9 +16,7 @@ spec:
|
|||||||
{{- .Values.persistence.accessModes | toYaml | nindent 4 }}
|
{{- .Values.persistence.accessModes | toYaml | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
volumeMode: Filesystem
|
volumeMode: Filesystem
|
||||||
{{- if .Values.persistence.storageClass }}
|
{{- include "gitea.persistence.storageClass" . | nindent 2 }}
|
||||||
storageClassName: {{ .Values.persistence.storageClass }}
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.persistence.volumeName }}
|
{{- with .Values.persistence.volumeName }}
|
||||||
volumeName: {{ . }}
|
volumeName: {{ . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -4,6 +4,9 @@ metadata:
|
|||||||
name: {{ include "gitea.fullname" . }}-ssh
|
name: {{ include "gitea.fullname" . }}-ssh
|
||||||
labels:
|
labels:
|
||||||
{{- include "gitea.labels" . | nindent 4 }}
|
{{- include "gitea.labels" . | nindent 4 }}
|
||||||
|
{{- if .Values.service.ssh.labels }}
|
||||||
|
{{- toYaml .Values.service.ssh.labels | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- toYaml .Values.service.ssh.annotations | nindent 4 }}
|
{{- toYaml .Values.service.ssh.annotations | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
|
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: 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: 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: bitnami/redis-cluster:7.+$
|
59
unittests/deployment/HA.yaml
Normal file
59
unittests/deployment/HA.yaml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
suite: deployment template (HA)
|
||||||
|
release:
|
||||||
|
name: gitea-unittests
|
||||||
|
namespace: testing
|
||||||
|
templates:
|
||||||
|
- templates/gitea/deployment.yaml
|
||||||
|
- templates/gitea/config.yaml
|
||||||
|
tests:
|
||||||
|
- it: fails with multiple replicas and "GIT_GC_REPOS" enabled
|
||||||
|
template: templates/gitea/deployment.yaml
|
||||||
|
set:
|
||||||
|
replicaCount: 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 '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."
|
||||||
|
- it: fails with multiple replicas and bleve issue indexer
|
||||||
|
template: templates/gitea/deployment.yaml
|
||||||
|
set:
|
||||||
|
replicaCount: 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/deployment.yaml
|
||||||
|
set:
|
||||||
|
replicaCount: 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."
|
@ -15,3 +15,17 @@ tests:
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
name: gitea-unittests
|
name: gitea-unittests
|
||||||
|
- it: deployment labels are set
|
||||||
|
template: templates/gitea/deployment.yaml
|
||||||
|
set:
|
||||||
|
deployment.labels:
|
||||||
|
hello: world
|
||||||
|
asserts:
|
||||||
|
- isSubset:
|
||||||
|
path: metadata.labels
|
||||||
|
content:
|
||||||
|
hello: world
|
||||||
|
- isSubset:
|
||||||
|
path: spec.template.metadata.labels
|
||||||
|
content:
|
||||||
|
hello: world
|
||||||
|
@ -91,3 +91,20 @@ tests:
|
|||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.containers[0].image
|
path: spec.template.spec.containers[0].image
|
||||||
value: "global.example.com/gitea/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a"
|
value: "global.example.com/gitea/gitea:1.19.3-rootless@sha256:b28e8f3089b52ebe6693295df142f8c12eff354e9a4a5bfbb5c10f296c3a537a"
|
||||||
|
- it: correctly renders floating tag references
|
||||||
|
template: templates/gitea/deployment.yaml
|
||||||
|
set:
|
||||||
|
image.tag: 1.21 # use non-quoted value on purpose. See: https://gitea.com/gitea/helm-chart/issues/631
|
||||||
|
asserts:
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.initContainers[0].image
|
||||||
|
value: "gitea/gitea:1.21-rootless"
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.initContainers[1].image
|
||||||
|
value: "gitea/gitea:1.21-rootless"
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.initContainers[2].image
|
||||||
|
value: "gitea/gitea:1.21-rootless"
|
||||||
|
- equal:
|
||||||
|
path: spec.template.spec.containers[0].image
|
||||||
|
value: "gitea/gitea:1.21-rootless"
|
||||||
|
@ -15,9 +15,33 @@ tests:
|
|||||||
hosts:
|
hosts:
|
||||||
- "{{ .Values.global.giteaHostName }}"
|
- "{{ .Values.global.giteaHostName }}"
|
||||||
asserts:
|
asserts:
|
||||||
|
- isKind:
|
||||||
|
of: Ingress
|
||||||
- equal:
|
- equal:
|
||||||
path: spec.tls[0].hosts[0]
|
path: spec.tls[0].hosts[0]
|
||||||
value: "gitea.example.com"
|
value: "gitea.example.com"
|
||||||
- equal:
|
- equal:
|
||||||
path: spec.rules[0].host
|
path: spec.rules[0].host
|
||||||
value: "gitea.example.com"
|
value: "gitea.example.com"
|
||||||
|
- it: Ingress Class using TPL
|
||||||
|
set:
|
||||||
|
global.ingress.className: "ingress-class"
|
||||||
|
ingress.className: "{{ .Values.global.ingress.className }}"
|
||||||
|
ingress.enabled: true
|
||||||
|
ingress.hosts[0].host: "some-host"
|
||||||
|
ingress.tls:
|
||||||
|
- secretName: gitea-tls
|
||||||
|
hosts:
|
||||||
|
- "some-host"
|
||||||
|
asserts:
|
||||||
|
- isKind:
|
||||||
|
of: Ingress
|
||||||
|
- equal:
|
||||||
|
path: spec.tls[0].hosts[0]
|
||||||
|
value: "some-host"
|
||||||
|
- equal:
|
||||||
|
path: spec.rules[0].host
|
||||||
|
value: "some-host"
|
||||||
|
- equal:
|
||||||
|
path: spec.ingressClassName
|
||||||
|
value: "ingress-class"
|
||||||
|
39
unittests/deployment/storage-class-configuration.yaml
Normal file
39
unittests/deployment/storage-class-configuration.yaml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# File: tests/gitea-storageclass-tests.yaml
|
||||||
|
|
||||||
|
suite: storage class configuration tests
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: gitea-storageclass-tests
|
||||||
|
namespace: testing
|
||||||
|
|
||||||
|
templates:
|
||||||
|
- templates/gitea/pvc.yaml
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- it: should set storageClassName when persistence.storageClass is defined
|
||||||
|
template: templates/gitea/pvc.yaml
|
||||||
|
set:
|
||||||
|
persistence.storageClass: "my-storage-class"
|
||||||
|
asserts:
|
||||||
|
- equal:
|
||||||
|
path: "spec.storageClassName"
|
||||||
|
value: "my-storage-class"
|
||||||
|
|
||||||
|
- it: should set global.storageClass when persistence.storageClass is not defined
|
||||||
|
template: templates/gitea/pvc.yaml
|
||||||
|
set:
|
||||||
|
global.storageClass: "default-storage-class"
|
||||||
|
asserts:
|
||||||
|
- equal:
|
||||||
|
path: spec.storageClassName
|
||||||
|
value: "default-storage-class"
|
||||||
|
|
||||||
|
- it: should set storageClassName when persistence.storageClass is defined and global.storageClass is defined
|
||||||
|
template: templates/gitea/pvc.yaml
|
||||||
|
set:
|
||||||
|
global.storageClass: "default-storage-class"
|
||||||
|
persistence.storageClass: "my-storage-class"
|
||||||
|
asserts:
|
||||||
|
- equal:
|
||||||
|
path: spec.storageClassName
|
||||||
|
value: "my-storage-class"
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user