64 lines
1.7 KiB
YAML
64 lines
1.7 KiB
YAML
# --------------------------------------
|
|
# Exascaler CSI Driver - Storage Class
|
|
# --------------------------------------
|
|
|
|
apiVersion: storage.k8s.io/v1
|
|
kind: StorageClass
|
|
metadata:
|
|
name: exascaler-csi-file-driver-sc
|
|
provisioner: exa.csi.ddn.com
|
|
allowVolumeExpansion: true
|
|
parameters:
|
|
exaMountUid: "1001" # Uid which will be used to access the volume in pod. Should be synced between EXA server and clients.
|
|
---
|
|
|
|
# ------------------------------------------------
|
|
# Exaxscaler CSI Driver - Persistent Volume Claim
|
|
# ------------------------------------------------
|
|
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: exascaler-csi-file-driver-pvc-from-snapshot-1
|
|
spec:
|
|
storageClassName: exascaler-csi-file-driver-sc
|
|
dataSource:
|
|
kind: VolumeSnapshot
|
|
apiGroup: snapshot.storage.k8s.io
|
|
name: snapshot-test # snapshots created by ./snapshot-from-dynamic.yaml
|
|
accessModes:
|
|
- ReadWriteMany
|
|
resources:
|
|
requests:
|
|
storage: 3Gi
|
|
---
|
|
|
|
# ---------
|
|
# Nginx pod
|
|
# ---------
|
|
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: nginx-dynamic-volume-from-snapshot
|
|
spec:
|
|
securityContext:
|
|
runAsUser: 1001
|
|
containers:
|
|
- image: nginxinc/nginx-unprivileged
|
|
imagePullPolicy: IfNotPresent
|
|
name: nginx
|
|
command: [ "/bin/bash", "-c", "--" ]
|
|
args: [ "while true; do echo $(date) > /data/timefile; sleep 5; sync; done;" ]
|
|
ports:
|
|
- containerPort: 80
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- mountPath: /data
|
|
name: exascaler-csi-file-driver-data
|
|
volumes:
|
|
- name: exascaler-csi-file-driver-data
|
|
persistentVolumeClaim:
|
|
claimName: exascaler-csi-file-driver-pvc-from-snapshot-1
|
|
readOnly: false
|