GPU-Live/template/gyeonggi/ddn/ddn-install-running/exa-csi-driver-2.3.5/examples/exa-dynamic-nginx-sub.yaml

85 lines
2.4 KiB
YAML

# --------------------------------------
# Exascaler CSI Driver - Storage Class
# --------------------------------------
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: exascaler-csi-file-driver-sc-sub
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.
---
# ------------------------------------------------
# Exaxscaler CSI Driver - Persistent Volume Claim
# ------------------------------------------------
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: exascaler-csi-file-driver-pvc-sub
spec:
storageClassName: exascaler-csi-file-driver-sc-sub
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
---
# ---------
# Nginx pod
# ---------
apiVersion: v1
kind: Pod
metadata:
name: nginx-dynamic-volume-sub
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
- image: nginxinc/nginx-unprivileged
imagePullPolicy: IfNotPresent
name: nginx-sub1
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do echo $(date) > /data/timefile; sleep 5; sync; done;" ]
ports:
- containerPort: 81
protocol: TCP
volumeMounts:
- mountPath: /data
subPath: sub1
name: exascaler-csi-file-driver-data
- image: nginxinc/nginx-unprivileged
imagePullPolicy: IfNotPresent
name: nginx-sub2
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do echo $(date) > /data/timefile; sleep 5; sync; done;" ]
ports:
- containerPort: 82
protocol: TCP
volumeMounts:
- mountPath: /data
subPath: sub2
name: exascaler-csi-file-driver-data
volumes:
- name: exascaler-csi-file-driver-data
persistentVolumeClaim:
claimName: exascaler-csi-file-driver-pvc-sub
readOnly: false