Provide gitea-ha support -> multiple replicas #206
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As of now it is possible to run gitea with multiple replicas with the helm chart,
however a lot of configuration is needed.
This could be included in the helm chart.
Is this already possible? I've set
replicaCount: 2
and it seems to work as expected for now - did not do extensive testing yet though.Yes, it's working fine, but needs lots of configuration. ?
My Gitea
values.yaml
is about 300 LOC for this. ?Can you provide example on how to configure gitea for HA, like did you configure redis in the config?
Thank you
Removed some unrelated settings:
Other params are set via terraform
I'm using
keydb
asredis
andopensearch
aselasticsearch
replacementThe example is perfect. Only one thing which is Gitea's problem is every instance will run the cron jobs. A simple method is to add a command line flag to disable or enable all cron jobs which is not implemented by v1.15.7. A better case is Gitea cluster, all Gitea replications could know each other and will elect one to run cron jobs.
That would be good. Do you think it's a thing to implement in the Chart or in Gitea itself?
That would be awesome! I just found this issue on their github: https://github.com/go-gitea/gitea/issues/13791
So I guess they would eventually make it possible. I'm not sure we can implement it in the Chart before they did it in Gitea itself
I've spent some time revisiting the current state, especially #205 and #206.
I'll try to replicate the setup posted from @viceice in the next days/weeks and see how far I can go.
Of course there is still #205 which aims to provide a built-in solution for HA. While this would of course be nice (!), I wonder if we should rather focus on documenting HA requirements and configuration changes given all the considerations one has to make when going HA here (indexer, memcache, attachment storage, etc.).
If this is done and people have a guide how to go HA with their setup, one could focus on a "simple" default config within the chart as in #206 for a "best effort" config solution that does not require multiple additional chart deployments?
I think it could be worth adding a dedicated markdown doc (e.g.
ha-setup.md
) into here (next to the README or withindocs/
orconfig/
) and explain what is needed and what are possible options to achieve this.For example, outlining that
elasticsearch
(or similar) is required as a code indexer which itself requires quite some resources on a cluster (4-8 GB and multiple nodes) AFAICS. Such information might already put the topic off the table for some as their cluster is not that large.I really see the need to consolidate information from #205 and #206 as otherwise it will get lost over time and it is really hard for users to grasp the current state. I am aware of the Gitea-internal issue of cron jobs running multiple times as described in #205, but I guess for most users this might be acceptable in a trade-off for a HA setup.
AFAICS, and mainly putting things together from @lunny comment in https://gitea.com/gitea/helm-chart/pulls/205#issuecomment-593662:
Additional/External requirements for Gitea HA
(Happy to edit this list or put it into a dedicated markdown doc in the repo)
elasticsearch
or similar, 4-8 GB in memory)minio
)redis
or similar)Done in #437.