From 48d930fedc904f795584263d6d03413ba0e24ebd Mon Sep 17 00:00:00 2001 From: baschno Date: Sat, 3 Jan 2026 20:35:36 +0100 Subject: [PATCH] longhorn savegame --- 11_storage_tests/foo-pv.yaml | 9 ++++++++ 11_storage_tests/foo-pvc.yaml | 0 Longhorn/pod_with_pvc.yaml | 40 +++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 11_storage_tests/foo-pv.yaml create mode 100644 11_storage_tests/foo-pvc.yaml create mode 100644 Longhorn/pod_with_pvc.yaml diff --git a/11_storage_tests/foo-pv.yaml b/11_storage_tests/foo-pv.yaml new file mode 100644 index 0000000..86c753d --- /dev/null +++ b/11_storage_tests/foo-pv.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: foo-pv +spec: + storageClassName: "longhorn" + claimRef: + name: foo-pvc + namespace: foo \ No newline at end of file diff --git a/11_storage_tests/foo-pvc.yaml b/11_storage_tests/foo-pvc.yaml new file mode 100644 index 0000000..e69de29 diff --git a/Longhorn/pod_with_pvc.yaml b/Longhorn/pod_with_pvc.yaml new file mode 100644 index 0000000..1376c25 --- /dev/null +++ b/Longhorn/pod_with_pvc.yaml @@ -0,0 +1,40 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: longhorn-volv-pvc + namespace: default +spec: + accessModes: + - ReadWriteOnce + storageClassName: longhorn + resources: + requests: + storage: 2Gi +--- +apiVersion: v1 +kind: Pod +metadata: + name: volume-test + namespace: default +spec: + restartPolicy: Always + containers: + - name: volume-test + image: nginx:stable-alpine + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - ls + - /data/lost+found + initialDelaySeconds: 5 + periodSeconds: 5 + volumeMounts: + - name: volv + mountPath: /data + ports: + - containerPort: 80 + volumes: + - name: volv + persistentVolumeClaim: + claimName: longhorn-volv-pvc