GPU-Live/template/stg/ddn/ddn-install-running/nhn.yaml

75 lines
1.8 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
# volumeBindingMode: WaitForFirstConsumer
allowedTopologies:
- matchLabelExpressions:
- key: topology.exa.csi.ddn.com/zone
values:
- zone-1
parameters:
exaMountUid: "1001" # Uid which will be used to access the volume in pod. Should be synced between EXA server and clients.
# projectId: "100001" # Points to a project id to be used to set volume quota.
# bindMount: "false"
---
# ------------------------------------------------
# Exaxscaler CSI Driver - Persistent Volume Claim
# ------------------------------------------------
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: exascaler-csi-file-driver-pvc
spec:
storageClassName: exascaler-csi-file-driver-sc
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
---
# ---------
# Nginx pod
# ---------
apiVersion: v1
kind: Pod
metadata:
name: nginx-dynamic-volume
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.exa.csi.ddn.com/zone
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
topology.exa.csi.ddn.com/zone: zone-1
securityContext:
runAsUser: 1001
# runAsUser: 1002
# fsGroup: 1001
containers:
- image: nginxinc/nginx-unprivileged
imagePullPolicy: IfNotPresent
name: nginx
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
readOnly: false