Give demo app a real Longhorn-backed PVC

This commit is contained in:
2026-09-03 03:29:28 +01:00
parent 39e04e43d0
commit 170ef2d116
2 changed files with 24 additions and 0 deletions
+8
View File
@@ -32,7 +32,15 @@ spec:
# Mounts the ConfigMap's index.html over nginx's default page. # Mounts the ConfigMap's index.html over nginx's default page.
- name: page - name: page
mountPath: /usr/share/nginx/html mountPath: /usr/share/nginx/html
# Real, replicated storage from apps/demo/pvc.yaml — a harmless
# subdirectory nginx doesn't otherwise use, proving a Longhorn
# volume can actually be attached and written to.
- name: data
mountPath: /usr/share/nginx/html/data
volumes: volumes:
- name: page - name: page
configMap: configMap:
name: demo-page name: demo-page
- name: data
persistentVolumeClaim:
claimName: demo-data
+16
View File
@@ -0,0 +1,16 @@
# A hands-on check that Longhorn actually works (see docs/06-longhorn.md).
# No storageClassName is set, so Kubernetes uses whichever StorageClass is
# marked default — Longhorn's own chart marks itself default, so this PVC
# gets real, replicated storage on the two Proxmox workers without naming
# Longhorn here explicitly.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: demo-data
namespace: demo
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi