fix: Add PVC for gitea to maintain consistent state on rollout
This commit is contained in:
@@ -5,6 +5,8 @@ metadata:
|
|||||||
namespace: gitea
|
namespace: gitea
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: gitea
|
app: gitea
|
||||||
@@ -16,6 +18,7 @@ spec:
|
|||||||
securityContext:
|
securityContext:
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
runAsUser: 1000
|
runAsUser: 1000
|
||||||
|
fsGroup: 1000
|
||||||
seccompProfile:
|
seccompProfile:
|
||||||
type: RuntimeDefault
|
type: RuntimeDefault
|
||||||
containers:
|
containers:
|
||||||
@@ -29,10 +32,15 @@ spec:
|
|||||||
drop:
|
drop:
|
||||||
- ALL
|
- ALL
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /data
|
- mountPath: /var/lib/gitea
|
||||||
name: gitea-data
|
name: gitea-data
|
||||||
|
- mountPath: /etc/gitea
|
||||||
|
name: gitea-config
|
||||||
volumes:
|
volumes:
|
||||||
- name: gitea-data
|
- name: gitea-data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: gitea-pvc
|
claimName: gitea-pvc
|
||||||
|
- name: gitea-config
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: gitea-config-pvc
|
||||||
|
|
||||||
|
|||||||
@@ -9,4 +9,15 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 10Gi
|
storage: 10Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: gitea-config-pvc
|
||||||
|
namespace: gitea
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
|||||||
Reference in New Issue
Block a user