Add Kubernetes manifests for self-hosted services

This commit is contained in:
2026-06-28 13:53:49 +03:00
committed by ExQz
parent eaba9643a0
commit 3b1998f376
32 changed files with 727 additions and 0 deletions
+57
View File
@@ -0,0 +1,57 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea
namespace: gitea
spec:
replicas: 1
selector:
matchLabels:
app: gitea
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea
image: docker.io/gitea/gitea:latest
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 3000
- name: ssh
containerPort: 2222
env:
- name: GITEA__server__HTTP_PORT
value: "3000"
- name: GITEA__server__SSH_PORT
value: "2222"
- name: GITEA__server__SSH_LISTEN_PORT
value: "2222"
- name: GITEA__server__START_SSH_SERVER
value: "true"
- name: GITEA__server__ROOT_URL
value: "https://git.mariushome.lt/"
- name: GITEA__server__DOMAIN
value: "git.mariushome.lt"
- name: GITEA__database__DB_TYPE
value: postgres
- name: GITEA__database__HOST
value: postgres.database.svc.cluster.local:5432
- name: GITEA__database__NAME
value: gitea
- name: GITEA__database__USER
value: admin
- name: GITEA__database__PASSWD
valueFrom:
secretKeyRef:
name: gitea-db-secret
key: password
volumeMounts:
- name: gitea-data
mountPath: /data
volumes:
- name: gitea-data
persistentVolumeClaim:
claimName: gitea-hetzner-pvc
+20
View File
@@ -0,0 +1,20 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gitea
namespace: gitea
annotations:
ingress.cilium.io/loadbalancer-mode: "dedicated"
spec:
ingressClassName: cilium
rules:
- host: "git.mariushome.lt"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: gitea
port:
number: 3000
+4
View File
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: gitea
+12
View File
@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitea-hetzner-pvc
namespace: gitea
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: hcloud-volumes
+17
View File
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: gitea
namespace: gitea
spec:
selector:
app: gitea
ports:
- name: http
protocol: TCP
port: 3000
targetPort: http
- name: ssh
protocol: TCP
port: 2222
targetPort: ssh