blob: c17446dbf47d10ceddbf1dd6d2a812d988c74368 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Forgejo storage. Deliberately separate from the git-server/cgit volume:
# Forgejo owns its own repositories under /data/nfs/k3svolumes/forgejo/data and
# never touches the 80 bare repos cgit serves out of
# /data/nfs/k3svolumes/git-server/repos.
#
# Both directories must exist and contain a .nfs-sentinel file before the pod
# starts -- see the initContainers in deployment.yaml and the README.
apiVersion: v1
kind: PersistentVolume
metadata:
name: forgejo-data-pv
spec:
capacity:
storage: 20Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
hostPath:
path: /data/nfs/k3svolumes/forgejo/data
type: Directory
---
# app.ini lives here, and with it the SECRET_KEY and INTERNAL_TOKEN that Forgejo
# generates on first start. Losing this volume invalidates existing sessions and
# any stored credentials, so it is kept on NFS (ZFS-snapshotted) rather than in
# an emptyDir.
apiVersion: v1
kind: PersistentVolume
metadata:
name: forgejo-config-pv
spec:
capacity:
storage: 1Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
hostPath:
path: /data/nfs/k3svolumes/forgejo/config
type: Directory
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: forgejo-data-pvc
namespace: services
spec:
storageClassName: ""
# Pinned explicitly: without volumeName the 1Gi config claim below would also
# be a valid match for this 20Gi volume, leaving the binding to the
# smallest-sufficient-PV heuristic.
volumeName: forgejo-data-pv
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: forgejo-config-pvc
namespace: services
spec:
storageClassName: ""
volumeName: forgejo-config-pv
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
|