Comment on How to self-host a distributed git server cluster?
slazer2au@lemmy.world 1 week ago
If I am understanding correctly I would run Forgejo in a k8s/k3s pod
This will be your starting point but you would have to modify the setup to bring it into k8s or k3s
marauding_gibberish142@lemmy.dbzer0.com 1 week ago
Thank you. I did think of this but I’m afraid this might lead me into a chicken and egg situation, since I plan to store my Kubernetes manifests in my git repo. But if the Kubernetes instances go down for whatever reason, I won’t be able to access my git server anymore.
I edited the post which will hopefully clarify what I’m thinking about
slazer2au@lemmy.world 1 week ago
I would have a standalone Forgejo server to act as your infrastructure server. Make it separate from your production k8s/k3s environment.
If something knocks out your infrastructure Forgejo instance then your prod instance will continue to work. If something knocks out your prod, then your infrastructure instance is still there to pull on.
One of the reasons I suggest k8s/k3s if something happens k8s/k3s will try to automatically bring the broken node back online.
marauding_gibberish142@lemmy.dbzer0.com 1 week ago
You mean have two git servers, one “PROD” and one for infrastructure, and mirror repos in both? I suppose I could do that, but if I were to go that route I could simply create 5 remotes for every repo and push to each individually.
For the k8s suggestion - what happens when my k8s cluster goes down, taking my git server along with it?
Zwuzelmaus@feddit.org 1 week ago
Not really.
K8s would use a “checked-out” visible representation, not the repo database itself.
marauding_gibberish142@lemmy.dbzer0.com 1 week ago
Sorry, I don’t understand. What happens when my k8s cluster goes down taking my git server with it?
Zwuzelmaus@feddit.org 1 week ago
You do not let your k8s control instance look “live” at your git server during the start (or reformation) of the whole cluster. It needs the (repo and) files checked out somewhere locally, and this local “somewhere” must exist at start time.
Later, when your git is alive, you do a regular git pull for keeping it up to date.