From ba912200c83dd872d6b47706ce1001832b1bb8ab Mon Sep 17 00:00:00 2001 From: aggarwalakshun Date: Mon, 7 Jul 2025 06:04:09 +0530 Subject: [PATCH] use nfs pv and pvc --- cluster/apps/authelia/authelia-pvc.yml | 27 +++++++++++++++++++++++--- cluster/apps/authelia/authelia.yml | 2 +- cluster/apps/authelia/tmp-pod.yml | 20 ------------------- 3 files changed, 25 insertions(+), 24 deletions(-) delete mode 100644 cluster/apps/authelia/tmp-pod.yml diff --git a/cluster/apps/authelia/authelia-pvc.yml b/cluster/apps/authelia/authelia-pvc.yml index 0b5e513..69d9c78 100644 --- a/cluster/apps/authelia/authelia-pvc.yml +++ b/cluster/apps/authelia/authelia-pvc.yml @@ -1,13 +1,34 @@ +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: authelia-pv + namespace: default +spec: + capacity: + storage: 100Mi + volumeMode: Filesystem + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + mountOptions: + - hard + - nfsvers=4.1 + nfs: + path: /k3s/volumes/authelia + server: 10.0.0.123 + --- apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: longhorn-authelia + name: authelia-pvc namespace: default spec: accessModes: - ReadWriteMany - storageClassName: longhorn + storageClassName: "" + volumeMounts: authelia-pv resources: requests: - storage: 500m + storage: 100m diff --git a/cluster/apps/authelia/authelia.yml b/cluster/apps/authelia/authelia.yml index caa4c63..9b31b57 100644 --- a/cluster/apps/authelia/authelia.yml +++ b/cluster/apps/authelia/authelia.yml @@ -24,4 +24,4 @@ spec: volumes: - name: config persistentVolumeClaim: - claimName: longhorn-authelia + claimName: authelia-pvc diff --git a/cluster/apps/authelia/tmp-pod.yml b/cluster/apps/authelia/tmp-pod.yml deleted file mode 100644 index d1f5428..0000000 --- a/cluster/apps/authelia/tmp-pod.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -apiVersion: v1 -kind: Pod -metadata: - name: ubuntu - namespace: default - labels: - name: ubuntu -spec: - containers: - - name: ubuntu - image: ubuntu:latest - command: ["/bin/bash", "-c", "while true; do sleep 10; done;"] - volumeMounts: - - name: data - mountPath: /mnt - volumes: - - name: data - persistentVolumeClaim: - claimName: longhorn-authelia