diff --git a/README.md b/README.md index a27b06e..a7be506 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,14 @@ The Intelliflash Container Storage Interface (CSI) Driver provides a CSI interfa |StorageClass Secrets|Beta|>= v1.3.0|>=1.0.0|>=1.13|>=3.11.2| |Mount options|GA|>=v1.0.0|>=v1.0.0|>=v1.13|>=3.11.2| +## Access Modes support +|Access mode| Supported in version| +|--- |--- | +|ReadWriteOnce| >=1.0.0 | +|ReadOnlyMany| >=1.0.0 | +|ReadWriteMany| >=1.0.0 | +|ReadWriteOncePod| >=1.1.0 | + ## Requirements - Kubernetes cluster must allow privileged pods, this flag must be set for the API server and the kubelet @@ -48,14 +56,10 @@ The Intelliflash Container Storage Interface (CSI) Driver provides a CSI interfa By default, the driver will create filesystems in this dataset and mount them to use as Kubernetes volumes. 2. Clone driver repository ```bash - git clone https://github.com/DDNStorage/intelliflash-csi-file-driver.git - cd IntelliFlash-csi-file-driver + git clone https://bitbucket.eng-us.tegile.com/scm/eco/intelliflash-csi-file-driver.git + cd intelliflash-csi-file-driver ``` -3. Load docker image - ```bash - docker load -i bin/intelliflash-csi-file-driver.tar - ``` -4. Edit `deploy/kubernetes/intelliflash-csi-file-driver-config.yaml` file. Driver configuration example: +3. Edit `deploy/kubernetes/intelliflash-csi-file-driver-config.yaml` file. Driver configuration example: ```yaml arrays: array: @@ -71,11 +75,11 @@ The Intelliflash Container Storage Interface (CSI) Driver provides a CSI interfa #defaultMountOptions: username=admin,password=secrete # username/password must be defined for CIFS debug: true ``` -5. Create Kubernetes secret from the file: +4. Create Kubernetes secret from the file: ```bash kubectl create secret generic intelliflash-csi-file-driver-config --from-file=deploy/kubernetes/intelliflash-csi-file-driver-config.yaml ``` -6. Register driver to Kubernetes: +5. Register driver to Kubernetes: ```bash kubectl apply -f deploy/kubernetes/intelliflash-csi-file-driver.yaml ``` @@ -272,7 +276,7 @@ arrays: defaultDataIp: 10.204.86.71 defaultMountFsType: nfs defaultMountOptions: nolock,vers=3 # only vers=4 works in container - parentShareMountPoint: "export/csi-file/parentfs" # used for lowTierVolume + parentShareMountPoint: "/export/csi-file/parentfs" # used for lowTierVolume debug: true diff --git a/bin/intelliflash-csi-file-driver b/bin/intelliflash-csi-file-driver new file mode 100755 index 0000000..d1f1ef0 Binary files /dev/null and b/bin/intelliflash-csi-file-driver differ diff --git a/bin/intelliflash-csi-file-driver-arm64.tar b/bin/intelliflash-csi-file-driver-arm64.tar new file mode 100644 index 0000000..b690742 Binary files /dev/null and b/bin/intelliflash-csi-file-driver-arm64.tar differ diff --git a/bin/intelliflash-csi-file-driver.tar b/bin/intelliflash-csi-file-driver.tar index fd75b70..5145911 100644 Binary files a/bin/intelliflash-csi-file-driver.tar and b/bin/intelliflash-csi-file-driver.tar differ diff --git a/deploy/kubernetes/intelliflash-csi-file-driver.yaml b/deploy/kubernetes/intelliflash-csi-file-driver.yaml index c2ff58f..3de19aa 100644 --- a/deploy/kubernetes/intelliflash-csi-file-driver.yaml +++ b/deploy/kubernetes/intelliflash-csi-file-driver.yaml @@ -210,7 +210,7 @@ spec: # csi-provisioner: sidecar container that watches Kubernetes PersistentVolumeClaim objects # and triggers CreateVolume/DeleteVolume against a CSI endpoint - name: csi-provisioner - image: k8s.gcr.io/sig-storage/csi-provisioner:v2.2.0 + image: registry.k8s.io/sig-storage/csi-provisioner:v3.0.0 imagePullPolicy: IfNotPresent args: - --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock @@ -224,7 +224,7 @@ spec: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy - name: csi-snapshotter - image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.1.1 + image: registry.k8s.io/sig-storage/csi-snapshotter:v4.1.1 imagePullPolicy: IfNotPresent args: - -v=3 @@ -249,7 +249,7 @@ spec: capabilities: add: ['SYS_ADMIN'] allowPrivilegeEscalation: true - image: intelliflash-csi-file-driver:master + image: intelliflashbyddn/intelliflash-csi-file-driver:v1.0.0 imagePullPolicy: IfNotPresent args: - --nodeid=$(KUBE_NODE_NAME) @@ -372,7 +372,7 @@ spec: capabilities: add: ['SYS_ADMIN'] allowPrivilegeEscalation: true - image: intelliflash-csi-file-driver:master + image: intelliflashbyddn/intelliflash-csi-file-driver:v1.0.0 imagePullPolicy: IfNotPresent args: - --nodeid=$(KUBE_NODE_NAME) diff --git a/examples/kubernetes/nginx-dynamic-rwoPod.yaml b/examples/kubernetes/nginx-dynamic-rwoPod.yaml new file mode 100644 index 0000000..983595c --- /dev/null +++ b/examples/kubernetes/nginx-dynamic-rwoPod.yaml @@ -0,0 +1,70 @@ +# -------------------------------------- +# IntelliFlash CSI Driver - Storage Class +# -------------------------------------- + +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: intelliflash-csi-file-driver-cs-nginx-dynamic +provisioner: intelliflash-csi-file-driver.intelliflash.com +mountOptions: # list of options for `mount -o ...` command +# - noatime # +allowVolumeExpansion: true +# volumeBindingMode: Immediate +# allowedTopologies: +# - matchLabelExpressions: +# - key: topology.kubernetes.io/zone +# values: +# - zone-1 +# parameters: +# configName: nstor-box3 + #project: customProject # to overwrite "defaultProject" config property [project] + #dataIp: 20.20.20.253 # to overwrite "defaultDataIp" config property + #mountFsType: nfs # to overwrite "defaultMountFsType" config property + #mountOptions: noatime # to overwrite "defaultMountOptions" config property + # nfsAccessList: rw:no_root_squash@10.204.86.116 # list of addresses to allow NFS access to. + # Format: [][accessMode]@[address]/[mask] + # accessMode and mask are optional, default mode is rw. +--- + +# ------------------------------------------------ +# IntelliFlash CSI Driver - Persistent Volume Claim +# ------------------------------------------------ + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: intelliflash-csi-file-driver-pvc-nginx-dynamic +spec: + storageClassName: intelliflash-csi-file-driver-cs-nginx-dynamic + accessModes: + - ReadWriteOncePod + resources: + requests: + storage: 1Gi +--- + +# --------- +# Nginx pod +# --------- + +apiVersion: v1 +kind: Pod +metadata: + name: nginx-dynamic-volume +spec: + containers: + - image: nginx + imagePullPolicy: IfNotPresent + name: nginx + ports: + - containerPort: 80 + protocol: TCP + volumeMounts: + - mountPath: /usr/share/nginx/html + name: intelliflash-csi-file-driver-data + volumes: + - name: intelliflash-csi-file-driver-data + persistentVolumeClaim: + claimName: intelliflash-csi-file-driver-pvc-nginx-dynamic + readOnly: false