From 24b31b3ed826f61fbb71d1548ae8717176498599 Mon Sep 17 00:00:00 2001 From: Joerg Lehmann Date: Tue, 10 Nov 2026 08:07:11 +0100 Subject: [PATCH] git.nbit.ch has been moved to onyx-dev.nbit.ch --- gitea/README.md | 7 ++++ gitea/gitea.yaml | 55 ++++++++++++++++++++++++++++++++ gitea/onyx-dev-gitea.kube | 12 +++++++ traefik/configuration/gitea.yaml | 17 ++++++++++ 4 files changed, 91 insertions(+) create mode 100644 gitea/README.md create mode 100644 gitea/gitea.yaml create mode 100644 gitea/onyx-dev-gitea.kube create mode 100644 traefik/configuration/gitea.yaml diff --git a/gitea/README.md b/gitea/README.md new file mode 100644 index 0000000..f221e81 --- /dev/null +++ b/gitea/README.md @@ -0,0 +1,7 @@ + +Config of Gitea is done in config/app.ini + +To disable the possibility to self-register: + +[root@onyx ~]# grep DISABLE_REGISTRATION /data/gitea/config/app.ini +DISABLE_REGISTRATION = true diff --git a/gitea/gitea.yaml b/gitea/gitea.yaml new file mode 100644 index 0000000..83d3cc0 --- /dev/null +++ b/gitea/gitea.yaml @@ -0,0 +1,55 @@ +--- +apiVersion: v1 +kind: Pod +metadata: + annotations: + io.kubernetes.cri-o.TTY/gitea: "false" + io.podman.annotations.autoremove/gitea: "FALSE" + io.podman.annotations.init/gitea: "FALSE" + io.podman.annotations.label/gitea: type:container_runtime_t + io.podman.annotations.privileged/gitea: "FALSE" + io.podman.annotations.publish-all/gitea: "FALSE" + labels: + app: gitea-pod + name: gitea-pod +spec: + containers: + - image: docker.io/gitea/gitea:latest-rootless + name: gitea + ports: + - containerPort: 3000 + hostPort: 9080 + hostIP: 127.0.0.1 + securityContext: + capabilities: + drop: + - CAP_MKNOD + - CAP_AUDIT_WRITE + volumeMounts: + - mountPath: /var/lib/gitea + name: data-gitea-data-0 + - mountPath: /etc/gitea + name: data-gitea-config-0 + - mountPath: /etc/timezone + name: etc-timezone-0 + readOnly: true + - mountPath: /etc/localtime + name: etc-localtime-0 + readOnly: true + volumes: + - hostPath: + path: /data/gitea/data + type: Directory + name: data-gitea-data-0 + - hostPath: + path: /data/gitea/config + type: Directory + name: data-gitea-config-0 + - hostPath: + path: /etc/timezone + type: File + name: etc-timezone-0 + - hostPath: + path: /etc/localtime + type: File + name: etc-localtime-0 diff --git a/gitea/onyx-dev-gitea.kube b/gitea/onyx-dev-gitea.kube new file mode 100644 index 0000000..4ab27da --- /dev/null +++ b/gitea/onyx-dev-gitea.kube @@ -0,0 +1,12 @@ +[Unit] +Description=Gitea Git Server +Before=local-fs.target + +[Kube] +Yaml=/data/onyx-dev_pods/gitea/gitea.yaml +LogDriver=journald +Network=pasta + +[Install] +# Start by default on boot +WantedBy=multi-user.target default.target diff --git a/traefik/configuration/gitea.yaml b/traefik/configuration/gitea.yaml new file mode 100644 index 0000000..eea9ed4 --- /dev/null +++ b/traefik/configuration/gitea.yaml @@ -0,0 +1,17 @@ +http: + routers: + gitea: + entrypoints: + - websecure + tls: + certresolver: "myresolver" + domains: + - main: "git.nbit.ch" + rule: "Host(`git.nbit.ch`)" + service: gitea + + services: + gitea: + loadBalancer: + servers: + - url: http://127.0.0.1:9080/