From cb5fe4f624d4b49e1745154056768925175f857f Mon Sep 17 00:00:00 2001 From: Gerrit Edzards Date: Sun, 9 Jun 2024 14:50:20 +0200 Subject: [PATCH] Add PersistentVolume --- manifests/daily-workout/deployment.yaml | 7 +++++++ manifests/daily-workout/pv.yaml | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 manifests/daily-workout/pv.yaml diff --git a/manifests/daily-workout/deployment.yaml b/manifests/daily-workout/deployment.yaml index cb37148..a9b2c10 100644 --- a/manifests/daily-workout/deployment.yaml +++ b/manifests/daily-workout/deployment.yaml @@ -22,3 +22,10 @@ spec: env: - name: NODE_ENV value: "production" + volumeMounts: + - mountPath: "/app/data" + name: workout-volume + volumes: + - name: workout-volume + persistentVolumeClaim: + claimName: workout-pvc \ No newline at end of file diff --git a/manifests/daily-workout/pv.yaml b/manifests/daily-workout/pv.yaml new file mode 100644 index 0000000..a4fd4c6 --- /dev/null +++ b/manifests/daily-workout/pv.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: workout-pv +spec: + capacity: + storage: 100m + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/data/workout" + +--- + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: workout-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100m