feat: add Gitea deployment, services, and persistent volume claims
This commit is contained in:
44
cluster/apps/gitea/gitea-db.yml
Normal file
44
cluster/apps/gitea/gitea-db.yml
Normal 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
|
||||
Reference in New Issue
Block a user