spdk/example: add example manifests

Signed-off-by: Derek Su <derek.su@suse.com>
This commit is contained in:
Derek Su 2023-05-10 12:37:41 +08:00 committed by David Ko
parent 3a44ec93c9
commit 32eaf99217
2 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,40 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: longhorn-volv-pvc
namespace: default
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn-spdk
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

View File

@ -0,0 +1,27 @@
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: longhorn-spdk
provisioner: driver.longhorn.io
allowVolumeExpansion: true
reclaimPolicy: Delete
volumeBindingMode: Immediate
parameters:
# backup, backingImage and snapshot related parameters are not supported in SPDK preview stage
numberOfReplicas: "2"
staleReplicaTimeout: "2880"
fsType: "ext4"
backendStoreDriver: "spdk"
# mkfsParams: "-I 256 -b 4096 -O ^metadata_csum,^64bit"
# nodeSelector: "storage,fast"
# recurringJobSelector: '[{"name":"snap-group", "isGroup":true},
# {"name":"backup", "isGroup":false}]'
# fromBackup: ""
# backingImage: "bi-test"
# backingImageDataSourceType: "download"
# backingImageDataSourceParameters: '{"url": "https://backing-image-example.s3-region.amazonaws.com/test-backing-image"}'
# backingImageChecksum: "SHA512 checksum of the backing image"
# unmapMarkSnapChainRemoved: "ignored"
# diskSelector: "ssd,fast"