From 4a66953c589f2edb0e2a1a1165edc3eafd148f49 Mon Sep 17 00:00:00 2001 From: Super User Date: Fri, 21 Aug 2026 15:44:40 -0400 Subject: [PATCH] fix: Add PVC for gitea to maintain consistent state on rollout --- apps/gitea/deployment.yaml | 10 +++++++++- apps/gitea/pvc.yaml | 13 ++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/apps/gitea/deployment.yaml b/apps/gitea/deployment.yaml index ff73593..bf621a8 100644 --- a/apps/gitea/deployment.yaml +++ b/apps/gitea/deployment.yaml @@ -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 diff --git a/apps/gitea/pvc.yaml b/apps/gitea/pvc.yaml index bca10bd..3156b78 100644 --- a/apps/gitea/pvc.yaml +++ b/apps/gitea/pvc.yaml @@ -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