diff --git a/cluster/apps/jellystat/jellystat-pvc.yml b/cluster/apps/jellystat/jellystat-pvc.yml index 6666f02..d8dd7f2 100644 --- a/cluster/apps/jellystat/jellystat-pvc.yml +++ b/cluster/apps/jellystat/jellystat-pvc.yml @@ -1,13 +1,34 @@ +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: jellystat-pv + namespace: default +spec: + capacity: + storage: 1Gi + volumeMode: Filesystem + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + mountOptions: + - hard + - nfsvers=4.1 + nfs: + path: /k3s/volumes/jellystat + server: 10.0.0.123 + --- apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: longhorn-jellystat-data + name: jellystat-pvc namespace: default spec: accessModes: - ReadWriteMany - storageClassName: longhorn + storageClassName: "" + volumeName: jellystat-pv resources: requests: storage: 1Gi diff --git a/cluster/apps/jellystat/jellystat.yml b/cluster/apps/jellystat/jellystat.yml index eb6470d..3f133d2 100644 --- a/cluster/apps/jellystat/jellystat.yml +++ b/cluster/apps/jellystat/jellystat.yml @@ -1,3 +1,4 @@ +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -14,12 +15,6 @@ spec: app: jellystat spec: initContainers: - - name: init-cleanup - image: busybox - command: ["rm", "-rf", "/var/lib/postgresql/data/lost+found"] - volumeMounts: - - name: backup - mountPath: /var/lib/postgresql/data - name: jellystat-db image: postgres:alpine restartPolicy: Always @@ -38,7 +33,7 @@ spec: volumeMounts: - name: backup mountPath: /var/lib/postgresql/data - subPath: pgdata + subPath: db containers: - name: jellystat image: cyfershepard/jellystat:1.1.6 @@ -68,4 +63,4 @@ spec: volumes: - name: backup persistentVolumeClaim: - claimName: longhorn-jellystat-data + claimName: jellystat-pvc