fix: Add PVC for gitea to maintain consistent state on rollout

This commit is contained in:
Super User
2026-08-21 15:44:40 -04:00
parent d8e5e6f053
commit 4a66953c58
2 changed files with 21 additions and 2 deletions

View File

@@ -5,6 +5,8 @@ metadata:
namespace: gitea
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: gitea
@@ -16,6 +18,7 @@ spec:
securityContext:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 1000
seccompProfile:
type: RuntimeDefault
containers:
@@ -29,10 +32,15 @@ spec:
drop:
- ALL
volumeMounts:
- mountPath: /data
- mountPath: /var/lib/gitea
name: gitea-data
- mountPath: /etc/gitea
name: gitea-config
volumes:
- name: gitea-data
persistentVolumeClaim:
claimName: gitea-pvc
- name: gitea-config
persistentVolumeClaim:
claimName: gitea-config-pvc

View File

@@ -9,4 +9,15 @@ spec:
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitea-config-pvc
namespace: gitea
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi