Skip to content

Commit

Permalink
updated v
Browse files Browse the repository at this point in the history
  • Loading branch information
Qeas committed Nov 9, 2022
1 parent 0e4681d commit 9e22687
Show file tree
Hide file tree
Showing 9 changed files with 978 additions and 68 deletions.
123 changes: 92 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
The Intelliflash Container Storage Interface (CSI) Block Driver provides a CSI interface used by Container Orchestrators (CO) to manage the lifecycle of Intelliflash volumes over iSCSI protocol.

## Feature List
|Feature|Feature Status|CSI Driver Version|CSI Spec Version|Kubernetes Version|
|--- |--- |--- |--- |--- |
|Static Provisioning|GA|>= v1.0.0|>= v1.0.0|>=1.13|
|Dynamic Provisioning|GA|>= v1.0.0|>= v1.0.0|>=1.13|
|RW mode|GA|>= v1.0.0|>= v1.0.0|>=1.13|
|RO mode|GA|>= v1.0.0|>= v1.0.0|>=1.13|
|Creating and deleting snapshot|GA|>= v1.2.0|>= v1.0.0|>=1.17|
|Provision volume from snapshot|GA|>= v1.2.0|>= v1.0.0|>=1.17|
|Provision volume from another volume|GA|>= v1.3.0|>= v1.0.0|>=1.17|
|List snapshots of a volume|Beta|>= v1.2.0|>= v1.0.0|>=1.17|
|Expand volume|GA|>= v1.3.0|>= v1.1.0|>=1.16|
|Access list for volume (NFS only)|GA|>= v1.3.0|>= v1.0.0|>=1.13|
|Topology|Beta|>= v1.4.0|>= v1.0.0|>=1.17|
|Raw block device|In development|future|>= v1.0.0|>=1.14|
|StorageClass Secrets|Beta|>= v1.3.0|>=1.0.0|>=1.13|
|Mount options|GA|>=v1.0.0|>=v1.0.0|>=v1.13|
|Feature|Feature Status|CSI Driver Version|CSI Spec Version|Kubernetes Version|Intelliflash Version|
|--- |--- |--- |--- |--- |--- |
|Static Provisioning|GA|>= v1.0.0|>= v1.0.0|>=1.13|>=3.11.2|
|Dynamic Provisioning|GA|>= v1.0.0|>= v1.0.0|>=1.13|>=3.11.2|
|RW mode|GA|>= v1.0.0|>= v1.0.0|>=1.13|>=3.11.2|
|RO mode|GA|>= v1.0.0|>= v1.0.0|>=1.13|>=3.11.2|
|Creating and deleting snapshot|GA|>= v1.2.0|>= v1.0.0|>=1.20|>=3.11.2|
|Provision volume from snapshot|GA|>= v1.2.0|>= v1.0.0|>=1.20|>=3.11.2|
|Provision volume from another volume|GA|>= v1.3.0|>= v1.0.0|>=1.20|>=3.11.2|
|List snapshots of a volume|Beta|>= v1.2.0|>= v1.0.0|>=1.20|>=3.11.2|
|Expand volume|GA|>= v1.3.0|>= v1.1.0|>=1.16|>=3.11.2|
|Access list for volume (NFS only)|GA|>= v1.3.0|>= v1.0.0|>=1.13|>=3.11.2|
|Topology|Beta|>= v1.4.0|>= v1.0.0|>=1.17|>=3.11.2|
|Raw block device|In development|future|>= v1.0.0|>=1.14|>=3.11.2|
|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|

## Requirements

Expand All @@ -46,25 +46,27 @@ The Intelliflash Container Storage Interface (CSI) Block Driver provides a CSI i

2. Clone driver repository
```bash
git clone https://github.com/DDNStorage/intelliflash-csi-block-driver.git
git clone https://bitbucket.eng-us.tegile.com/eco/intelliflash-csi-block-driver.git
cd intelliflash-csi-block-driver
```
3. Edit `deploy/kubernetes/intelliflash-csi-block-driver-config.yaml` file. Driver configuration example:
```yaml
arrays:
array1:
restIp: https://172.27.10.30:443 # [required] IntelliFlash REST API endpoint
username: admin # [required] IntelliFlash REST API username
password: t # [required] IntelliFlash REST API password
defaultProject: csi-block # default project name for driver's volume
defaultDataIp: 172.27.10.30 # default IntelliFlash data IP

useChapAuth: true # Defines whether CHAP authentication is enabled
chapUser: admin # CHAP username
chapSecret: chapsecretif # CHAP secret
initiatorGroup: csi-block-chap-initiator-group # Initiator group associated with project, required for CHAP
debug: true
```
```yaml
arrays:
array1:
restIp: https://172.27.10.30:443 # [required] IntelliFlash REST API endpoint
username: admin # [required] IntelliFlash REST API username
password: t # [required] IntelliFlash REST API password
defaultProject: csi-block # default project name for driver's volume
defaultDataIp: 172.27.10.30 # default IntelliFlash data IP

useChapAuth: true # Defines whether CHAP authentication is enabled
chapUser: admin # CHAP username
chapSecret: chapsecretif # CHAP secret
initiatorGroup: csi-block-chap-initiator-group # Initiator group associated with project, required for CHAP
debug: true
```
4. Create Kubernetes secret from the file:
```bash
kubectl create secret generic intelliflash-csi-block-driver-config --from-file=deploy/kubernetes/intelliflash-csi-block-driver-config.yaml
Expand Down Expand Up @@ -259,6 +261,65 @@ Example:
initiatorGroup: csi-chap-initiator-group # Initiator group associated with project, required for CHAP
```

## InheritProjectSettings option

This option tells the driver whether it should inherit iSCSI options from the project or use what is provided via storage class parameters or config. If this option is set to `true`, no additional settings are required. If you want to use a separate iSCSI target/target group, use `false` and provide the following parameters. For storageClass parameters:
- target
- targetGroup
- iSCSIPort (optional)

Example storageClass:

```yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: intelliflash-csi-block-driver-pvc-nginx-dynamic-clone
spec:
storageClassName: intelliflash-csi-block-driver-cs-nginx-dynamic
dataSource:
kind: PersistentVolumeClaim
apiGroup: ""
name: intelliflash-csi-block-driver-pvc-nginx-dynamic # pvc name
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
parameters:
targetGroup: non-default
target: non-default
inheritProjectSettings: "false"
```


For config values a prefix 'Default' is added to each parameter, as follows:
- DefaultTarget
- DefaultTargetGroup
- DefaultISCSIPort

Example config file:
```yaml
arrays:
array1:
restIp: https://172.27.10.30:443 # [required] IntelliFlash REST API endpoint
username: admin # [required] IntelliFlash REST API username
password: t # [required] IntelliFlash REST API password
defaultProject: csi-block # default project name for driver's volume
defaultDataIp: 172.27.10.30 # default IntelliFlash data IP
inheritProjectSettings: false # defines whether the volume should inherit iscsi mapping from the project or create depending on csi config
defaultTarget: csi # default target to use when inheritProjectSettings=false
defaultTargetGroup: csi # default target group to use when inheritProjectSettings=false
defaultHostGroup: csi # default host group to use when inheritProjectSettings=false
defaultISCSIPort: 3260 # default iSCSI port to use when inheritProjectSettings=false
useChapAuth: true # Defines whether CHAP authentication is enabled
chapUser: admin # CHAP username
chapSecret: chapsecretif # CHAP secret
initiatorGroup: csi-block-chap-initiator-group # Initiator group associated with project, required for CHAP
debug: true
```

## Uninstall

Using the same files as for installation:
Expand Down
28 changes: 15 additions & 13 deletions deploy/kubernetes/intelliflash-csi-block-driver-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@
# $ kubectl create secret generic intelliflash-csi-block-driver-config \
# --from-file=deploy/kubernetes/intelliflash-csi-block-driver-config.yaml
#

arrays:
array:
restIp: https://10.204.86.70:443 # [required] IntelliFlash REST API endpoint
username: admin # [required] IntelliFlash REST API username
password: t # [required] IntelliFlash REST API password
defaultProject: csi-block-chap # default project name for driver's volume
defaultDataIp: 10.204.86.71 # default IntelliFlash data IP

useChapAuth: true # Defines whether CHAP authentication is enabled
chapUser: admin # CHAP username
chapSecret: chapsecretif # CHAP secret
initiatorGroup: csi-block-chap-initiator-group # Initiator group associated with project, required for CHAP
debug: true # more logs
array1:
restIp: https://10.204.86.70:443
username: admin
password: t
defaultProject: csi-block-test1
defaultDataIp: 10.204.86.71
zone: zone-1
array2:
restIp: https://10.204.86.70:443
username: admin
password: t
defaultProject: csi-block-test2
defaultDataIp: 10.204.86.75
zone: zone-2
debug: true
56 changes: 39 additions & 17 deletions deploy/kubernetes/intelliflash-csi-block-driver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
# IntelliFlash CSI Driver
# ----------------------

apiVersion: storage.k8s.io/v1beta1 #k8s =>1.14
apiVersion: storage.k8s.io/v1 #k8s =>1.20
kind: CSIDriver
metadata:
name: intelliflash-csi-block-driver.intelliflash.com
spec:
attachRequired: false
podInfoOnMount: false
attachRequired: true
podInfoOnMount: true
---


Expand Down Expand Up @@ -72,7 +72,10 @@ rules:
verbs: ['get', 'list', 'watch']
- apiGroups: ['storage.k8s.io']
resources: ['volumeattachments']
verbs: ['get', 'list', 'watch', 'update']
verbs: ['get', 'list', 'watch', 'update', 'patch']
- apiGroups: ['storage.k8s.io']
resources: ['volumeattachments/status']
verbs: ['get', 'list', 'watch', 'update', 'patch']
# snapshotter specific
- apiGroups: ['snapshot.storage.k8s.io']
resources: ['volumesnapshotclasses']
Expand All @@ -83,6 +86,12 @@ rules:
- apiGroups: ['snapshot.storage.k8s.io']
resources: ['volumesnapshots']
verbs: ['get', 'list', 'watch', 'update']
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots/status"]
verbs: ["update"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents/status"]
verbs: ["update"]
- apiGroups: ['apiextensions.k8s.io']
resources: ['customresourcedefinitions']
verbs: ['create', 'list', 'watch', 'delete']
Expand Down Expand Up @@ -210,22 +219,35 @@ spec:
# csi-provisioner: sidecar container that watches Kubernetes PersistentVolumeClaim objects
# and triggers CreateVolume/DeleteVolume against a CSI endpoint
- name: csi-provisioner
image: quay.io/k8scsi/csi-provisioner:v1.4.0
image: k8s.gcr.io/sig-storage/csi-provisioner:v2.2.0
imagePullPolicy: IfNotPresent
args:
- --connection-timeout=25s
- --provisioner=intelliflash-csi-block-driver.intelliflash.com
- --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock
- --volume-name-prefix=pvc-intelliflash
- --feature-gates=Topology=true
- --strict-topology
- --immediate-topology=false
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy
- name: csi-attacher
image: k8s.gcr.io/sig-storage/csi-attacher:v3.5.0
imagePullPolicy: IfNotPresent
args:
- --csi-address=$(ADDRESS)
- --v=2
- --leader-election=true
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: csi-snapshotter
image: quay.io/k8scsi/csi-snapshotter:v1.1.0 # v1.2.0 doesn't work
image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.1.1
imagePullPolicy: IfNotPresent
args:
- --connection-timeout=25s
- -v=3
- --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock
volumeMounts:
- name: socket-dir
Expand All @@ -242,8 +264,8 @@ spec:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: driver
image: intelliflash-csi-block-driver:master
imagePullPolicy: Always
image: 10.204.86.117:5000/intelliflash-csi-block-driver:master
imagePullPolicy: IfNotPresent
args:
- --nodeid=$(KUBE_NODE_NAME)
- --endpoint=unix://csi/csi.sock
Expand Down Expand Up @@ -287,9 +309,9 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: intelliflash-csi-block-node-cluster-role
rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
# - apiGroups: [""]
# resources: ["events"]
# verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list"]
Expand Down Expand Up @@ -346,7 +368,7 @@ spec:
# 1) registers the CSI driver with kubelet
# 2) adds the drivers custom NodeId to a label on the Kubernetes Node API Object
- name: driver-registrar
image: quay.io/k8scsi/csi-node-driver-registrar:v1.1.0
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.0
imagePullPolicy: IfNotPresent
args:
- --v=3
Expand All @@ -368,8 +390,8 @@ spec:
capabilities:
add: ['SYS_ADMIN']
allowPrivilegeEscalation: true
image: intelliflash-csi-block-driver:master
imagePullPolicy: Always
image: 10.204.86.117:5000/intelliflash-csi-block-driver:master
imagePullPolicy: IfNotPresent
args:
- --nodeid=$(KUBE_NODE_NAME)
- --endpoint=unix://csi/csi.sock
Expand Down
Loading

0 comments on commit 9e22687

Please sign in to comment.