Add Gitea deployment, services, secrets, and persistent volume claims

This commit is contained in:
2025-10-15 14:10:50 +05:30
parent a91d4ef702
commit f943ffd9d4
5 changed files with 217 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea-db
namespace: git-ops
spec:
strategy:
type: Recreate
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.14
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: gitea-db-longhorn