Skip to content

Commit

Permalink
Merge pull request #96 from digitalocean/fix-driver-name
Browse files Browse the repository at this point in the history
csi: fix driver name
  • Loading branch information
fatih authored Oct 31, 2018
2 parents b5e1a53 + 312962f commit d70bb50
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## unreleased

* Fix driver name in CSIDriver, StorageClass and GetNodeInfo()
[[GH-96]](https://github.com/digitalocean/csi-digitalocean/pull/96)

## v0.3.0 - 2018.10.29

* This release is intended to be used with Kubernetes `v1.12.x` and is not compatible with older versions of Kubernetes. The latest CSI changes in v1.12.x are not compatible with older version unfortunately, therefore going forward we will not support older version anymore. The requirements also has changed, please make sure to read the README.md to see what kubelet and kube-apiserver flags needs to be enabled.
Expand Down
121 changes: 106 additions & 15 deletions deploy/kubernetes/releases/csi-digitalocean-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,107 @@

# Configuration to deploy release version of the CSI DigitalOcean
# plugin (https://github.com/digitalocean/csi-digitalocean) compatible with
# Kubernetes >=v1.10.5
# Kubernetes >=v1.12.1
#
# example usage: kubectl create -f <this_file>

---

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: csinodeinfos.csi.storage.k8s.io
spec:
group: csi.storage.k8s.io
names:
kind: CSINodeInfo
plural: csinodeinfos
scope: Cluster
validation:
openAPIV3Schema:
properties:
csiDrivers:
description: List of CSI drivers running on the node and their properties.
items:
properties:
driver:
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
type: array
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

---

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: csidrivers.csi.storage.k8s.io
spec:
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
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

---

# CSIDriverRegistry feature gate needs to be enabled
apiVersion: csi.storage.k8s.io/v1alpha1
kind: CSIDriver
metadata:
name: dobs.csi.digitalocean.com
spec:
attachRequired: true
podInfoOnMountVersion: "v1"

---

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: do-block-storage
namespace: kube-system
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: com.digitalocean.csi.dobs
provisioner: dobs.csi.digitalocean.com

---

Expand All @@ -54,9 +141,9 @@ spec:
serviceAccount: csi-do-controller-sa
containers:
- name: csi-provisioner
image: quay.io/k8scsi/csi-provisioner:v0.3.0
image: quay.io/k8scsi/csi-provisioner:v0.4.1
args:
- "--provisioner=com.digitalocean.csi.dobs"
- "--provisioner=dobs.csi.digitalocean.com"
- "--csi-address=$(ADDRESS)"
- "--v=5"
env:
Expand All @@ -67,7 +154,7 @@ spec:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
- name: csi-attacher
image: quay.io/k8scsi/csi-attacher:v0.3.0
image: quay.io/k8scsi/csi-attacher:v0.4.1
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
Expand Down Expand Up @@ -169,23 +256,28 @@ spec:
hostNetwork: true
containers:
- name: driver-registrar
image: quay.io/k8scsi/driver-registrar:v0.3.0
image: quay.io/k8scsi/driver-registrar:v0.4.1
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
- "--mode=node-register"
- "--driver-requires-attachment=true"
- "--pod-info-mount-version=\"v1\""
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
env:
- name: ADDRESS
value: /csi/csi.sock
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/dobs.csi.digitalocean.com/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: plugin-dir
mountPath: /csi/
# TODO(arslan): the registrar is not implemented yet
# - name: registrar-socket-dir
# mountPath: /var/lib/csi/sockets/
- name: registration-dir
mountPath: /registration/
- name: csi-do-plugin
image: digitalocean/do-csi-plugin:dev
args :
Expand Down Expand Up @@ -219,14 +311,13 @@ spec:
- name: device-dir
mountPath: /dev
volumes:
# TODO(arslan): the registar is not implemented yet
#- name: registrar-socket-dir
# hostPath:
# path: /var/lib/kubelet/device-plugins/
# type: DirectoryOrCreate
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins/
type: DirectoryOrCreate
- name: plugin-dir
hostPath:
path: /var/lib/kubelet/plugins/com.digitalocean.csi.dobs
path: /var/lib/kubelet/plugins/dobs.csi.digitalocean.com
type: DirectoryOrCreate
- name: pods-mount-dir
hostPath:
Expand Down
2 changes: 1 addition & 1 deletion driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
)

const (
driverName = "com.digitalocean.csi.dobs"
driverName = "dobs.csi.digitalocean.com"
)

var (
Expand Down

0 comments on commit d70bb50

Please sign in to comment.