feat: add Gitea deployment, services, and persistent volume claims

This commit is contained in:
2025-04-15 11:33:44 +05:30
parent 64c099f545
commit 0851fd3609
4 changed files with 215 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea-db
namespace: default
spec:
selector:
matchLabels:
app: gitea-db
template:
metadata:
labels:
app: gitea-db
spec:
initContainers:
- name: init-cleanup
image: busybox
command: ["rm", "-rf", "/var/lib/postgresql/data/lost+found"]
volumeMounts:
- name: db
mountPath: /var/lib/postgresql/data
containers:
- name: gitea-db
image: postgres:15.10
ports:
- containerPort: 5432
env:
- name: POSTGRES_USER
value: "gitea"
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: gitea-db-secret
key: password
- name: POSTGRES_DB
value: "gitea"
volumeMounts:
- name: db
mountPath: /var/lib/postgresql/data
volumes:
- name: db
persistentVolumeClaim:
claimName: longhorn-gitea-db