Skip to content

Commit

Permalink
Update CSI Deployment
Browse files Browse the repository at this point in the history
1. support CentOS8
2. add Fio example
3. fixes deployment steps
  • Loading branch information
weipengzhu authored and kylezh committed Sep 24, 2020
1 parent 8cf7b77 commit c5345f7
Show file tree
Hide file tree
Showing 7 changed files with 782 additions and 19 deletions.
37 changes: 37 additions & 0 deletions assets/zbs-csi-driver/example/fio.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: fio-pvc
spec:
storageClassName: zbs-csi-driver-default
volumeMode: Block
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 30Gi
---
apiVersion: v1
kind: Pod
metadata:
name: fio
labels:
app: fio
spec:
volumes:
- name: fio-pvc
persistentVolumeClaim:
claimName: fio-pvc
containers:
- name: fio
image: clusterhq/fio-tool
command:
- tail
args:
- '-f'
- /dev/null
imagePullPolicy: IfNotPresent
volumeDevices:
- devicePath: /mnt/fio
name: fio-pvc
restartPolicy: Always
89 changes: 89 additions & 0 deletions assets/zbs-csi-driver/v0.1.1/deploy/accounts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: zbs-csi-controller-account
namespace: iomesh-system
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: zbs-csi-provisioner-binding
subjects:
- kind: ServiceAccount
name: zbs-csi-controller-account
namespace: iomesh-system
roleRef:
kind: ClusterRole
name: zbs-csi-provisioner-role
apiGroup: rbac.authorization.k8s.io
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: zbs-csi-attacher-binding
subjects:
- kind: ServiceAccount
name: zbs-csi-controller-account
namespace: iomesh-system
roleRef:
kind: ClusterRole
name: zbs-csi-attacher-role
apiGroup: rbac.authorization.k8s.io
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: zbs-csi-snapshotter-binding
subjects:
- kind: ServiceAccount
name: zbs-csi-controller-account
namespace: iomesh-system
roleRef:
kind: ClusterRole
name: zbs-csi-snapshotter-role
apiGroup: rbac.authorization.k8s.io
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: zbs-csi-resizer-binding
subjects:
- kind: ServiceAccount
name: zbs-csi-controller-account
namespace: iomesh-system
roleRef:
kind: ClusterRole
name: zbs-csi-resizer-role
apiGroup: rbac.authorization.k8s.io
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: zbs-csi-driver-controller-binding
subjects:
- kind: ServiceAccount
name: zbs-csi-controller-account
namespace: iomesh-system
roleRef:
kind: ClusterRole
name: zbs-csi-driver-role
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: zbs-csi-node-account
namespace: iomesh-system
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: zbs-csi-driver-node-binding
subjects:
- kind: ServiceAccount
name: zbs-csi-node-account
namespace: iomesh-system
roleRef:
kind: ClusterRole
name: zbs-csi-driver-role
apiGroup: rbac.authorization.k8s.io
121 changes: 121 additions & 0 deletions assets/zbs-csi-driver/v0.1.1/deploy/clusterroles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: zbs-csi-provisioner-role
labels:
app.kubernetes.io/name: zbs-csi-driver
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots"]
verbs: ["get", "list"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents"]
verbs: ["get", "list"]
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "watch", "list", "delete", "update", "create"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: zbs-csi-attacher-role
labels:
app.kubernetes.io/name: zbs-csi-driver
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["csi.storage.k8s.io"]
resources: ["csinodeinfos"]
verbs: ["get", "list", "watch"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "watch", "list", "delete", "update", "create"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
# rename if there are conflicts
name: zbs-csi-snapshotter-role
labels:
app.kubernetes.io/name: zbs-csi-driver
rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents"]
verbs: ["create", "get", "list", "watch", "update", "delete"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents/status"]
verbs: ["update"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "watch", "list", "delete", "update", "create"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: zbs-csi-resizer-role
labels:
app.kubernetes.io/name: zbs-csi-driver
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "patch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims/status"]
verbs: ["patch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "watch", "list", "delete", "update", "create"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: zbs-csi-driver-role
labels:
app.kubernetes.io/name: zbs-csi-driver
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["list", "get"]
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["create", "update", "list", "get"]
4 changes: 4 additions & 0 deletions assets/zbs-csi-driver/v0.1.1/deploy/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kind: Namespace
apiVersion: v1
metadata:
name: iomesh-system

0 comments on commit c5345f7

Please sign in to comment.