From b76681ab23cff97640764acd6d04de0b9b3a3398 Mon Sep 17 00:00:00 2001 From: LordMathis Date: Wed, 22 Nov 2023 22:00:02 +0100 Subject: [PATCH] Update gitea ssh passthrough post --- content/blog/gitea.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/content/blog/gitea.md b/content/blog/gitea.md index 21246e0..5542566 100644 --- a/content/blog/gitea.md +++ b/content/blog/gitea.md @@ -7,6 +7,18 @@ If you are selfhosting Gitea on a single node Kubernetes cluster and want to ena +**Update** + +As of Gitea Helm Chart v9.0.0, Gitea is not a StatefulSet but a Deployment instead. In order to make this work you have to replace pod pod name `gitea-0` with: + +{{< highlight bash >}} +$(kubectl get po -n gitea -l app=gitea -o name --no-headers=true) +{{< / highlight >}} + + +Command substitution does not work in `AuthorizedKeysCommand` so I suggest creating a separate script along the lines of `/usr/local/bin/gitea-shell` + + ## Background I am currently in the process of migrating my selfhosted applications from docker-compose to Kubernetes. One of my most used selfhosted app is Gitea. I use it to host my projects, dotfiles and config files where I don't expect any contributions or I simply want to keep it more private. In my docker-compose setup I used SSH Container Passthrough from [Gitea docs](https://docs.gitea.io/en-us/install-with-docker/#SSH-container-passthrough) but when I moved Gitea to k8s I couldn't find any guides on how to achieve the same thing.