93 lines
2.0 KiB
YAML
93 lines
2.0 KiB
YAML
# --------------------------------------
|
|
# Exascaler CSI Driver - Storage Class
|
|
# --------------------------------------
|
|
|
|
apiVersion: storage.k8s.io/v1
|
|
kind: StorageClass
|
|
metadata:
|
|
name: exascaler-csi-file-driver-sc-replicaset
|
|
provisioner: exa.csi.ddn.com
|
|
allowedTopologies:
|
|
- matchLabelExpressions:
|
|
- key: topology.exa.csi.ddn.com/zone
|
|
values:
|
|
- zone-1
|
|
allowVolumeExpansion: true
|
|
parameters:
|
|
exaMountUid: "1000730000" # 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-replicaset
|
|
spec:
|
|
storageClassName: exascaler-csi-file-driver-sc-replicaset
|
|
accessModes:
|
|
- ReadWriteMany
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|
|
---
|
|
|
|
|
|
# ---------
|
|
# Nginx pods
|
|
# ---------
|
|
|
|
apiVersion: apps/v1
|
|
kind: ReplicaSet
|
|
metadata:
|
|
name: nginx-dynamic-volume
|
|
labels:
|
|
app: nginx-service
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: nginx-service
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: nginx-service
|
|
spec:
|
|
securityContext:
|
|
runAsUser: 1000730000
|
|
containers:
|
|
- image: nginxinc/nginx-unprivileged
|
|
imagePullPolicy: IfNotPresent
|
|
name: nginx
|
|
ports:
|
|
- containerPort: 80
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- mountPath: /data
|
|
name: exa-csi-driver-data
|
|
volumes:
|
|
- name: exa-csi-driver-data
|
|
persistentVolumeClaim:
|
|
claimName: exascaler-csi-file-driver-pvc-replicaset
|
|
readOnly: false
|
|
---
|
|
|
|
|
|
# -----------------
|
|
# Service for nginx
|
|
# -----------------
|
|
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: nginx-service-dynamic-volume
|
|
spec:
|
|
selector:
|
|
app: nginx-service
|
|
ports:
|
|
- protocol: TCP
|
|
port: 8888
|
|
targetPort: 80
|