Commit graph

167 commits

Author SHA1 Message Date
Renovate Bot
82dc077673 chore(deps): update redis-cluster docker tag to v9.1.1 (#555)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-11-06 00:17:45 +00:00
Renovate Bot
f3abf73ebc chore(deps): update redis-cluster docker tag to v9.0.13 (#547)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-10-24 00:07:01 +00:00
Michael Kriese
544e05a222 fix(deps): update helm release memcached to v6.6.7 2023-10-17 00:07:59 +00:00
Renovate Bot
3707755373 chore(deps): update redis-cluster docker tag to v9.0.12 (#511)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-10-16 00:05:56 +00:00
Renovate Bot
074def2acc chore(deps): update postgresql docker tag to v12.12.10 (#521)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-10-15 01:15:46 +00:00
Michael Kriese
ccb100015a fix(deps): update helm release postgresql to v13.1.5 2023-10-15 00:10:59 +00:00
pat-s
a249229ccf Downgrade postgresql-ha to 11.9.4 (#541)
As 11.9.8 included (by mistake) a major version bump from 15 -> 16

https://github.com/bitnami/charts/issues/19596

Co-authored-by: justusbunsi <justusbunsi@noreply.gitea.com>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/541
Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.com>
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2023-10-14 16:30:51 +00:00
Renovate Bot
0cc8c6d558 chore(deps): update postgresql-ha docker tag to v11.9.8 (#507)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-10-14 00:14:31 +00:00
Michael Kriese
e0c321323e fix(deps): update helm release memcached to v6.6.6 2023-10-14 00:08:02 +00:00
Michael Kriese
b87ae9244d fix(deps): update helm release postgresql to v13.1.4 2023-10-13 00:08:10 +00:00
Michael Kriese
e35f428d13 feat(deps): update helm release postgresql to v13 (#202)
Reviewed-on: https://codeberg.org/forgejo-contrib/forgejo-helm/pulls/202
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-committed-by: Michael Kriese <michael.kriese@gmx.de>
2023-10-11 04:29:33 +00:00
Michael Kriese
f943cddd94 fix(deps): update helm release memcached to v6.6.4 (#204)
Reviewed-on: https://codeberg.org/forgejo-contrib/forgejo-helm/pulls/204
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-committed-by: Michael Kriese <michael.kriese@gmx.de>
2023-10-10 19:43:54 +00:00
Michael Kriese
282f91b442 fix(deps): update helm release postgresql to v12.12.10 2023-10-09 12:03:34 +00:00
Michael Kriese
2e9e144568 fix(deps): update helm release postgresql to v12.12.9 2023-09-27 00:06:25 +00:00
Michael Kriese
8563c76b05 fix(deps): update helm release postgresql to v12.12.7 2023-09-26 00:06:20 +00:00
Renovate Bot
74cec11931 chore(deps): update postgresql docker tag to v12.12.5 (#506)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-09-24 17:55:21 +00:00
Michael Kriese
82e7d2e6b7 fix(deps): update helm release postgresql to v12.12.5 2023-09-24 00:06:33 +00:00
Michael Kriese
51072f96fb fix(deps): update helm release postgresql to v12.12.4 2023-09-21 00:06:35 +00:00
Michael Kriese
7710189dd4 fix(deps): update helm release postgresql to v12.11.1 (#186)
Reviewed-on: https://codeberg.org/forgejo-contrib/forgejo-helm/pulls/186
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-committed-by: Michael Kriese <michael.kriese@gmx.de>
2023-09-14 13:52:49 +00:00
Renovate Bot
779563141d chore(deps): update redis-cluster docker tag to v9 (#504)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [redis-cluster](https://github.com/bitnami/charts) | major | `8.8.2` -> `9.0.4` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi43OS4xIiwidXBkYXRlZEluVmVyIjoiMzYuODkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/504
Reviewed-by: pat-s <pat-s@noreply.gitea.com>
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-09-13 07:48:55 +00:00
Michael Kriese
6e31dde198 fix(deps): update helm release memcached to v6.6.2 2023-09-13 00:07:30 +00:00
Michael Kriese
b7aa7f0659 fix(deps): update helm release memcached to v6.6.1 2023-09-08 00:14:24 +00:00
Renovate Bot
38776e2b51 chore(deps): update postgresql docker tag to v12.10.1 (#505)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [postgresql](https://github.com/bitnami/charts) | patch | `12.10.0` -> `12.10.1` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi43OS4xIiwidXBkYXRlZEluVmVyIjoiMzYuNzkuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/505
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-09-07 02:23:12 +00:00
Renovate Bot
74fef7e4c6 chore(deps): update redis-cluster docker tag to v8.8.2 (#503)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [redis-cluster](https://github.com/bitnami/charts) | minor | `8.6.9` -> `8.8.2` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi43OS4xIiwidXBkYXRlZEluVmVyIjoiMzYuNzkuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/503
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2023-09-06 03:29:23 +00:00
pat-s
30000677d7
update chart.lock 2023-08-31 19:12:49 +02:00
Michael Kriese
bf09a1af36 fix(deps): update helm release postgresql to v12.10.0 (#181)
Reviewed-on: https://codeberg.org/forgejo-contrib/forgejo-helm/pulls/181
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-committed-by: Michael Kriese <michael.kriese@gmx.de>
2023-08-29 04:51:25 +00:00
Michael Kriese
7eb7edcfd0 fix(deps): update helm release postgresql to v12.9.0 (#174)
Reviewed-on: https://codeberg.org/forgejo-contrib/forgejo-helm/pulls/174
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-committed-by: Michael Kriese <michael.kriese@gmx.de>
2023-08-25 08:26:28 +00:00
Michael Kriese
f19d22c664 fix(deps): update helm release memcached to v6.6.0 (#180)
Reviewed-on: https://codeberg.org/forgejo-contrib/forgejo-helm/pulls/180
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-committed-by: Michael Kriese <michael.kriese@gmx.de>
2023-08-25 08:23:00 +00:00
Michael Kriese
0fbb2329f8 fix(deps): update helm release memcached to v6.5.9 2023-08-22 00:07:18 +00:00
Michael Kriese
c2e51defc0 fix(deps): update helm release memcached to v6.5.8 2023-08-18 00:07:22 +00:00
Michael Kriese
f1ce20e593 fix(deps): update helm release memcached to v6.5.7 2023-08-17 00:08:54 +00:00
Michael Kriese
19d4916943 fix(deps): update helm release postgresql to v12.7.1 (#169)
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-on: https://codeberg.org/forgejo-contrib/forgejo-helm/pulls/169
2023-07-27 06:16:19 +00:00
Michael Kriese
fd2810afab fix(deps): update helm release memcached to v6.5.6 2023-07-27 00:12:36 +00:00
Michael Kriese
e172610698 fix(deps): update helm release postgresql to v12.6.9 2023-07-25 00:07:46 +00:00
Michael Kriese
5b7cf738f4 fix(deps): update helm release postgresql to v12.6.8 (#164)
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-on: https://codeberg.org/forgejo-contrib/forgejo-helm/pulls/164
2023-07-21 06:37:27 +00:00
Michael Kriese
57d4de9535 fix(deps): update helm release postgresql to v12.6.7 2023-07-20 00:07:28 +00:00
pat-s
ede76d4b68
update helm deps and add makefile rule 2023-07-17 21:26:45 +02:00
pat-s
8e27bb9bae [Breaking] Add HA-support; switch to Deployment (#437)
# Changes

A big shoutout to @luhahn for all his work in #205 which served as the base for this PR.

## Documentation

- [x] After thinking for some time about it, I still prefer the distinct option (as started in #350), i.e. having a standalone "HA" doc under `docs/ha-setup.md` to not have a very long README (which is already quite long).
      Most of the information below should go into it with more details and explanations behind all of the individual components.

## Chart deps

~~- Adds `meilisearch` as a chart dependency for a HA-ready issue indexer. Only works with >= Gitea 1.20~~
~~- Adds `redis` as a chart dependency for a HA-ready session and queue store.~~
- Adds `redis-cluster` as a chart dependency for a HA-ready session and queue store (alternative to `redis`). Only works with >= Gitea 1.19.2.
- Removes `memcached` instead of `redis-cluster`
- Add `postgresql-ha` as default DB dep in favor of `postgres`

## Adds smart HA chart logic

The goal is to set smart config values that result in a HA-ready Gitea deployment if `replicaCount` > 1.

- If `replicaCount` > 1,
  - `gitea.config.session.PROVIDER` is automatically set to `redis-cluster`
  - `gitea.config.indexer.REPO_INDEXER_ENABLED` is automatically set to `false` unless the value is `elasticsearch` or `meilisearch`
  - `redis-cluster` is used for `[queue]` and `[cache]` and `[session]`mode or not

Configuration of external instances of `meilisearch` and `minio` are documented in a new markdown doc.

## Deployment vs Statefulset

Given all the discussions about this lately (#428), I think we could use both.
In the end, we do not have the requirement for a sequential pod scale up/scale down as it would happen in statefulsets.
On the other side, we do not have actual stateless pods as we are attaching a RWX to the deployment.
Yet I think because we do not have a leader-election requirement, spawning the pods as a deployment makes "Rolling Updates" easier and also signals users that there is no "leader election" logic and each pod can just be "destroyed" at anytime without causing interruption.

Hence I think we should be able to switch from a statefulset to a deployment, even in the single-replica case.

This change also brought up a templating/linting issue: the definition of `.Values.gitea.config.server.SSH_LISTEN_PORT` in `ssh-svc.yaml` just "luckily" worked so far due to naming-related lint processing. Due to the change from "statefulset" to "deployment", the processing queue changed and caused a failure complaining about `config.server.SSH_LISTEN_PORT` not being defined yet.
The only way I could see to fix this was to "properly" define the value in `values.yaml` instead of conditionally definining it in `helpers.tpl`. Maybe there's a better way?

## Chart PVC Creation

I've adapted the automated PVC creation from another chart to be able to provide the `storageClassName` as I couldn't get dynamic provisioning for EFS going with the current implementation.
In addition the naming and approach within the Gitea chart for PV creation is a bit unusual and aligning it might be beneficial.

A semi-unrelated change which will result in a breaking change for existing users but this PR includes a lot of breaking changes already, so including another one might not make it much worse...

- New `persistence.mount`: whether to mount an existing PVC (via `persistence.existingClaim`
- New `persistence.create`: whether to create a new PVC

## Testing

As this PR does a lot of things, we need proper testing.
The helm chart can be installed from the Git branch via `helm-git` as follows:

```
helm repo add gitea-charts git+https://gitea.com/gitea/helm-chart@/?ref=deployment
helm install gitea --version 0.0.0
```
It is **highly recommended** to test the chart in a dedicated namespace.

I've tested this myself with both `redis` and `redis-cluster` and it seemed to work fine.
I just did some basic operations though and we should do more niche testing before merging.

Examplary `values.yml` for testing (only needs a valid RWX storage class):

<details>

<summary>values.yaml</summary>

```yml
image:
  tag: "dev"
  PullPolicy: "Always"
  rootless: true

replicaCount: 2

persistence:
  enabled: true
  accessModes:
    - ReadWriteMany
  storageClass: FIXME

redis-cluster:
  enabled: false
  global:
    redis:
      password: gitea

gitea:
  config:
    indexer:
      ISSUE_INDEXER_ENABLED: true
      REPO_INDEXER_ENABLED: false
```
</details>

## Preferred setup

The preferred HA setup with respect to performance and stability might currently be as follows:

- Repos: RWX (e.g. EFS or Azurefiles NFS)
- Issue indexer: Meilisearch (HA)
- Session and cache: Redis Cluster (HA)
- Attachments/Avatars: Minio (HA)

This will result in a ~ 10-pod HA setup overall.
All pods have very low resource requests.

fix #98

Co-authored-by: pat-s <pat-s@noreply.gitea.io>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/437
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2023-07-17 19:09:42 +00:00
Michael Kriese
f9bfe6b22d fix(deps): update helm release postgresql to v12.6.6 2023-07-17 00:07:35 +00:00
Michael Kriese
f105e0b8a6 fix(deps): update helm release memcached to v6.5.5 2023-07-16 00:07:17 +00:00
Michael Kriese
9febe33951 fix(deps): update helm release postgresql to v12.6.0 (#157)
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-on: https://codeberg.org/forgejo-contrib/forgejo-helm/pulls/157
2023-07-03 13:01:28 +00:00
Michael Kriese
459375b870 fix(deps): update helm release memcached to v6.5.4 2023-06-28 00:07:06 +00:00
Michael Kriese
b9079ceda6 fix(deps): update helm release postgresql to v12.5.8 2023-06-20 00:07:05 +00:00
Michael Kriese
843a790239 fix(deps): update helm release memcached to v6.5.3 2023-06-17 00:07:06 +00:00
Michael Kriese
cf27151e1a fix(deps): update helm release postgresql to v12.5.7 2023-06-13 00:06:04 +00:00
Michael Kriese
683aae50a5 fix(deps): update helm release postgresql to v12.5.6 2023-05-31 00:07:12 +00:00
Michael Kriese
ceb78bbf3d fix(deps): update helm release postgresql to v12.5.5 2023-05-24 00:07:06 +00:00
Michael Kriese
e2b926153e fix(deps): update helm release postgresql to v12.5.4 2023-05-23 00:07:11 +00:00
Michael Kriese
fc8edfc4eb fix(deps): update helm release memcached to v6.5.2 2023-05-22 00:07:21 +00:00
Michael Kriese
549cba59a6 fix(deps): update helm release postgresql to v12.5.2 2023-05-17 00:14:43 +00:00