GPU-Live/template/stg/ddn/ddn-install-running/exa-csi-driver-2.3.5/examples/sc-override-config-dynamic....

65 lines
1.9 KiB
YAML

# --------------------------------------
# Exascaler CSI Driver - Storage Class
# --------------------------------------
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: exascaler-csi-file-driver-sc-override-config
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.
exaMountGid: "1001" # Gid which will be used to access the volume in pod. Should be synced between EXA server and clients.
volumeDirPermissions: "1750"
mountPoint: /exa-sc1 # mountpoint on the host where the exaFS will be mounted
exaFS: 10.204.86.217@tcp:/testfs/sc1 # default path to exa filesystem
---
# ------------------------------------------------
# Exaxscaler CSI Driver - Persistent Volume Claim
# ------------------------------------------------
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: exascaler-csi-file-driver-pvc-sc-override-1
spec:
storageClassName: exascaler-csi-file-driver-sc-override-config
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
---
# ---------
# Nginx pod
# ---------
apiVersion: v1
kind: Pod
metadata:
name: nginx-dynamic-volume-sc-override-1
spec:
securityContext:
runAsUser: 1001
runAsGroup: 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-sc-override-1
readOnly: false