I have a homelab k8s cluster running great using flux, several apps, based on the common homelab templates folks use. I currently host the gitops repo on a gitea instance running in a separate TrueNAS instance. This works fine but I’m not totally satisfied with how gitea is running. My inclination is to just run gitea in the k8s cluster, yes the same one that the gitops repo is managing. I realize this is bad in a bunch of obvious ways. But I’m wondering if it’s possibly not as bad as I might think it is. Of course I’d have a backup of the repo on my laptop. So if the gitea became unavailable for gitops I’d probably be able to bootstrap it from the backup repo. Any folks have experience running it like this?

  • Kltpzyxmm@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    I try and keep services that support my pipelines outside of these kinds of things.

  • Spooler32@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    Doesn’t seem like a problem unless the gitops controller is managing repositories too.

    This isn’t a cyclic dependency, and doesn’t affect failure modes. If the git server fails, the gitops controller fails or waits.

    It’s a bit more of a problem if the cluster IaC itself is managed using this git instance, but that’s easy enough to solve with backups or not doing that.

    Since this is a home lab, none of this is problematic. Feel free to condense everything - even the backup controller. Just make sure you have a way to access data and manually intervene if it shits the bed.

  • gscjj@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    Just be careful how much you depend on the git repo for Flux.

    I made the mistake of doing the same thing but took it a two further and used Gitea for my container images and helm charts. When I messed up Gitea during an ArgoCD sync, I couldn’t roll back because the custom helm chart for Gitea and Postgres came from Gitea.

    It also messed up every other application and ended up deleting all my resources during auto sync.

    Best thing I ended up doing was mirroring Gitea to GitHub, including images and charts. Then using that for ArgoCD.