diff --git a/CHANGELOG.md b/CHANGELOG.md index f86490fe..f0be760d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## [v0.0.4](https://github.com/vultr/vultr-csi) (2020-11-12) +### Bug Fixes +* default socket location had wrong path [31](https://github.com/vultr/vultr-csi/pull/31) + +### Enhancements +* Cleaned up naming on kubernetes resources to be more uniformed [31](https://github.com/vultr/vultr-csi/pull/31) + +### Docker Image +[CSI Container v0.0.4](https://hub.docker.com/r/vultr/vultr-csi/tags) + + ## [v0.0.3](https://github.com/vultr/vultr-csi) (2020-04-29) ### Dependecies * quay.io/k8scsi/csi-attacher v1.0.0 -> v2.2.0[#29](https://github.com/vultr/vultr-csi/pull/29) diff --git a/README.md b/README.md index 541fd759..a59a4031 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,8 @@ The deployment will create a [Storage Class](https://kubernetes.io/docs/concepts ```sh $ kubectl get storageclass NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE -vultr-block-storage (default) vultrbs.csi.driver.com Delete Immediate false 131m -vultr-block-storage-retain vultrbs.csi.driver.com Retain Immediate false 131m +vultr-block-storage (default) block.csi.vultr.com Delete Immediate false 131m +vultr-block-storage-retain block.csi.vultr.com Retain Immediate false 131m ``` To further validate the CSI, create a [PersistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) diff --git a/docs/releases/latest.yml b/docs/releases/latest.yml index 2663eef9..80859bad 100644 --- a/docs/releases/latest.yml +++ b/docs/releases/latest.yml @@ -4,7 +4,7 @@ apiVersion: storage.k8s.io/v1beta1 kind: CSIDriver metadata: - name: vultrbs.csi.driver.com + name: block.csi.vultr.com spec: attachRequired: true podInfoOnMount: true @@ -17,7 +17,7 @@ metadata: namespace: kube-system annotations: storageclass.kubernetes.io/is-default-class: "true" -provisioner: vultrbs.csi.driver.com +provisioner: block.csi.vultr.com --- kind: StorageClass @@ -25,7 +25,7 @@ apiVersion: storage.k8s.io/v1 metadata: name: vultr-block-storage-retain namespace: kube-system -provisioner: vultrbs.csi.driver.com +provisioner: block.csi.vultr.com reclaimPolicy: Retain ######### @@ -168,7 +168,7 @@ spec: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ - name: vultr-csi-plugin - image: vultr/vultr-csi:v0.0.3 + image: vultr/vultr-csi:v0.0.4 args : - "--endpoint=$(CSI_ENDPOINT)" - "--token=$(VULTR_API_KEY)" @@ -309,7 +309,7 @@ spec: - name: ADDRESS value: /csi/csi.sock - name: DRIVER_REG_SOCK_PATH - value: /var/lib/kubelet/plugins/vultrbs.csi.driver.com/csi.sock + value: /var/lib/kubelet/plugins/block.csi.vultr.com/csi.sock - name: KUBE_NODE_NAME valueFrom: fieldRef: @@ -320,7 +320,7 @@ spec: - name: registration-dir mountPath: /registration/ - name: csi-vultr-plugin - image: vultr/vultr-csi:v0.0.3 + image: vultr/vultr-csi:v0.0.4 args : - "--endpoint=$(CSI_ENDPOINT)" env: @@ -351,7 +351,7 @@ spec: type: Directory - name: plugin-dir hostPath: - path: /var/lib/kubelet/plugins/vultrbs.csi.driver.com + path: /var/lib/kubelet/plugins/block.csi.vultr.com type: DirectoryOrCreate - name: pods-mount-dir hostPath: @@ -408,4 +408,4 @@ metadata: rules: - apiGroups: [""] resources: ["events"] - verbs: ["get", "list", "watch", "create", "update", "patch"] \ No newline at end of file + verbs: ["get", "list", "watch", "create", "update", "patch"] \ No newline at end of file diff --git a/docs/releases/v0.0.4.yml b/docs/releases/v0.0.4.yml new file mode 100644 index 00000000..80859bad --- /dev/null +++ b/docs/releases/v0.0.4.yml @@ -0,0 +1,411 @@ +#################### +### Storage Classes +#################### +apiVersion: storage.k8s.io/v1beta1 +kind: CSIDriver +metadata: + name: block.csi.vultr.com +spec: + attachRequired: true + podInfoOnMount: true + +--- +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: vultr-block-storage + namespace: kube-system + annotations: + storageclass.kubernetes.io/is-default-class: "true" +provisioner: block.csi.vultr.com + +--- +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: vultr-block-storage-retain + namespace: kube-system +provisioner: block.csi.vultr.com +reclaimPolicy: Retain + +######### +### CRDs +######### +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: csinodeinfos.csi.storage.k8s.io + labels: + addonmanager.kubernetes.io/mode: Reconcile +spec: + group: csi.storage.k8s.io + version: v1alpha1 + names: + kind: CSINodeInfo + plural: csinodeinfos + scope: Cluster + validation: + openAPIV3Schema: + properties: + spec: + description: Specification of CSINodeInfo + properties: + drivers: + description: List of CSI drivers running on the node and their specs. + type: array + items: + properties: + name: + description: The CSI driver that this object refers to. + type: string + nodeID: + description: The node from the driver point of view. + type: string + topologyKeys: + description: List of keys supported by the driver. + items: + type: string + type: array + status: + description: Status of CSINodeInfo + properties: + drivers: + description: List of CSI drivers running on the node and their statuses. + type: array + items: + properties: + name: + description: The CSI driver that this object refers to. + type: string + available: + description: Whether the CSI driver is installed. + type: boolean + volumePluginMechanism: + description: Indicates to external components the required mechanism + to use for any in-tree plugins replaced by this driver. + pattern: in-tree|csi + type: string + +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: csidrivers.csi.storage.k8s.io + labels: + addonmanager.kubernetes.io/mode: Reconcile +spec: + version: v1alpha1 + group: csi.storage.k8s.io + names: + kind: CSIDriver + plural: csidrivers + scope: Cluster + validation: + openAPIV3Schema: + properties: + spec: + description: Specification of the CSI Driver. + properties: + attachRequired: + description: Indicates this CSI volume driver requires an attach operation, + and that Kubernetes should call attach and wait for any attach operation + to complete before proceeding to mount. + type: boolean + podInfoOnMountVersion: + description: Indicates this CSI volume driver requires additional pod + information (like podName, podUID, etc.) during mount operations. + type: string + + +################### +### CSI Controller +################### +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: csi-vultr-controller + namespace: kube-system +spec: + serviceName: "csi-vultr" + replicas: 1 + selector: + matchLabels: + app: csi-vultr-controller + template: + metadata: + labels: + app: csi-vultr-controller + role: csi-vultr + spec: + serviceAccountName: csi-vultr-controller-sa + containers: + - name: csi-provisioner + image: quay.io/k8scsi/csi-provisioner:v1.6.0 + args: + - "--volume-name-prefix=pvc" + - "--volume-name-uuid-length=16" + - "--csi-address=$(ADDRESS)" + - "--v=5" + env: + - name: ADDRESS + value: /var/lib/csi/sockets/pluginproxy/csi.sock + imagePullPolicy: "Always" + volumeMounts: + - name: socket-dir + mountPath: /var/lib/csi/sockets/pluginproxy/ + - name: csi-attacher + image: quay.io/k8scsi/csi-attacher:v2.2.0 + args: + - "--v=5" + - "--csi-address=$(ADDRESS)" + env: + - name: ADDRESS + value: /var/lib/csi/sockets/pluginproxy/csi.sock + imagePullPolicy: "Always" + volumeMounts: + - name: socket-dir + mountPath: /var/lib/csi/sockets/pluginproxy/ + - name: vultr-csi-plugin + image: vultr/vultr-csi:v0.0.4 + args : + - "--endpoint=$(CSI_ENDPOINT)" + - "--token=$(VULTR_API_KEY)" + env: + - name: CSI_ENDPOINT + value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock + - name: VULTR_API_KEY + valueFrom: + secretKeyRef: + name: vultr-csi + key: api-key + imagePullPolicy: "Always" + volumeMounts: + - name: socket-dir + mountPath: /var/lib/csi/sockets/pluginproxy/ + volumes: + - name: socket-dir + emptyDir: {} + +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: csi-vultr-controller-sa + namespace: kube-system + +## Attacher Role + Binding +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: csi-vultr-attacher-role + namespace: kube-system +rules: + - apiGroups: [""] + resources: ["persistentvolumes"] + verbs: ["get", "list", "watch", "update", "patch"] + - apiGroups: [""] + resources: ["nodes"] + verbs: ["get", "list", "watch"] + - apiGroups: ["storage.k8s.io"] + resources: ["csinodes"] + verbs: ["get", "list", "watch"] + - apiGroups: ["storage.k8s.io"] + resources: ["volumeattachments"] + verbs: ["get", "list", "watch", "update", "patch"] + +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: csi-controller-attacher-binding + namespace: kube-system +subjects: + - kind: ServiceAccount + name: csi-vultr-controller-sa + namespace: kube-system +roleRef: + kind: ClusterRole + name: csi-vultr-attacher-role + apiGroup: rbac.authorization.k8s.io + +## Provisioner Role + Binding +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: csi-vultr-provisioner-role + namespace: kube-system +rules: + - apiGroups: [""] + resources: ["secrets"] + verbs: ["get", "list"] + - 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: ["storage.k8s.io"] + resources: ["csinodes"] + verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: ["events"] + verbs: ["list", "watch", "create", "update", "patch"] + - apiGroups: [""] + resources: ["nodes"] + verbs: ["get", "list", "watch"] + +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: csi-controller-provisioner-binding + namespace: kube-system +subjects: + - kind: ServiceAccount + name: csi-vultr-controller-sa + namespace: kube-system +roleRef: + kind: ClusterRole + name: csi-vultr-provisioner-role + apiGroup: rbac.authorization.k8s.io + + +############ +## CSI Node +############ +--- +kind: DaemonSet +apiVersion: apps/v1 +metadata: + name: csi-vultr-node + namespace: kube-system +spec: + selector: + matchLabels: + app: csi-vultr-node + template: + metadata: + labels: + app: csi-vultr-node + role: csi-vultr + spec: + serviceAccountName: csi-vultr-node-sa + hostNetwork: true + containers: + - name: driver-registrar + image: quay.io/k8scsi/csi-node-driver-registrar:v1.3.0 + args: + - "--v=5" + - "--csi-address=$(ADDRESS)" + - "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)" + env: + - name: ADDRESS + value: /csi/csi.sock + - name: DRIVER_REG_SOCK_PATH + value: /var/lib/kubelet/plugins/block.csi.vultr.com/csi.sock + - name: KUBE_NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + volumeMounts: + - name: plugin-dir + mountPath: /csi/ + - name: registration-dir + mountPath: /registration/ + - name: csi-vultr-plugin + image: vultr/vultr-csi:v0.0.4 + args : + - "--endpoint=$(CSI_ENDPOINT)" + env: + - name: CSI_ENDPOINT + value: unix:///csi/csi.sock + imagePullPolicy: "Always" + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN"] + allowPrivilegeEscalation: true + volumeMounts: + - name: plugin-dir + mountPath: /csi + - name: pods-mount-dir + mountPath: /var/lib/kubelet + mountPropagation: "Bidirectional" + - mountPath: /dev + name: device-dir + volumes: + - name: registration-dir + hostPath: + path: /var/lib/kubelet/plugins_registry/ + type: DirectoryOrCreate + - name: kubelet-dir + hostPath: + path: /var/lib/kubelet + type: Directory + - name: plugin-dir + hostPath: + path: /var/lib/kubelet/plugins/block.csi.vultr.com + type: DirectoryOrCreate + - name: pods-mount-dir + hostPath: + path: /var/lib/kubelet + type: Directory + - name: device-dir + hostPath: + path: /dev + - name: udev-rules-etc + hostPath: + path: /etc/udev + type: Directory + - name: udev-rules-lib + hostPath: + path: /lib/udev + type: Directory + - name: udev-socket + hostPath: + path: /run/udev + type: Directory + - name: sys + hostPath: + path: /sys + type: Directory + +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: csi-vultr-node-sa + namespace: kube-system + +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: driver-registrar-binding + namespace: kube-system +subjects: + - kind: ServiceAccount + name: csi-vultr-node-sa + namespace: kube-system +roleRef: + kind: ClusterRole + name: csi-vultr-node-driver-registrar-role + apiGroup: rbac.authorization.k8s.io + +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: csi-vultr-node-driver-registrar-role + namespace: kube-system +rules: + - apiGroups: [""] + resources: ["events"] + verbs: ["get", "list", "watch", "create", "update", "patch"] \ No newline at end of file