Config + data pvs

This commit is contained in:
j 2025-07-27 10:26:27 +10:00
parent 09ac5c9c9b
commit 141bc23c1f

View file

@ -2,7 +2,21 @@
apiVersion: v1 apiVersion: v1
kind: PersistentVolume kind: PersistentVolume
metadata: metadata:
name: syncthing-pv name: syncthing-data-pv
spec:
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: local-path
hostPath:
path: /dpool/files
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: syncthing-config-pv
spec: spec:
capacity: capacity:
storage: 5Gi storage: 5Gi
@ -16,7 +30,7 @@ spec:
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
name: syncthing-pvc name: syncthing-data-pvc
namespace: home-server namespace: home-server
spec: spec:
accessModes: accessModes:
@ -25,7 +39,21 @@ spec:
resources: resources:
requests: requests:
storage: 5Gi storage: 5Gi
volumeName: syncthing-pv volumeName: syncthing-data-pv
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: syncthing-config-pvc
namespace: home-server
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: 5Gi
volumeName: syncthing-config-pv
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@ -61,14 +89,21 @@ spec:
protocol: UDP protocol: UDP
volumeMounts: volumeMounts:
- name: syncthing-data - name: syncthing-data
mountPath: /var/syncthing mountPath: /data
- name: syncthing-config
mountPath: /config
env: env:
- name: STGUIADDRESS - name: STGUIADDRESS
value: "0.0.0.0:8384" value: "0.0.0.0:8384"
- name: STCONFIG
value: "/config"
volumes: volumes:
- name: syncthing-data - name: syncthing-data
persistentVolumeClaim: persistentVolumeClaim:
claimName: syncthing-pvc claimName: syncthing-data-pvc
- name: syncthing-config
persistentVolumeClaim:
claimName: syncthing-config-pvc
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service