Skip to content

Commit 6258ca6

Browse files
committed
deployment: hostpath.csi.k8s.io as driver name
A driver name with domain name is the recommended approach to avoid name clashes. By changing both the default value in the code and the deployment files this change also works with the existing driver images.
1 parent cd0f09f commit 6258ca6

File tree

8 files changed

+10
-8
lines changed

8 files changed

+10
-8
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ Since volume snapshot is an alpha feature starting in Kubernetes v1.12, you need
230230
> Resource Version: 2418
231231
> Self Link: /apis/snapshot.storage.k8s.io/v1alpha1/volumesnapshotclasses/csi-hostpath-snapclass
232232
> UID: c8f5bc47-c716-11e8-8911-000c2967769a
233-
> Snapshotter: csi-hostpath
233+
> Snapshotter: hostpath.csi.k8s.io
234234
> Events: <none>
235235
> ```
236236
@@ -300,7 +300,7 @@ use the volume snapshot class to dynamically create a volume snapshot:
300300
> Spec:
301301
> Csi Volume Snapshot Source:
302302
> Creation Time: 1538576205471577525
303-
> Driver: csi-hostpath
303+
> Driver: hostpath.csi.k8s.io
304304
> Restore Size: 1073741824
305305
> Snapshot Handle: f55ff979-c716-11e8-bb16-000c2967769a
306306
> Deletion Policy: Delete
@@ -388,7 +388,7 @@ spec:
388388
volumes:
389389
- name: my-csi-volume
390390
csi:
391-
driver: csi-hostpath
391+
driver: hostpath.csi.k8s.io
392392
```
393393
394394
> See sample YAML file [here](./examples/csi-app-inline.yaml).

cmd/hostpathplugin/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func init() {
3131

3232
var (
3333
endpoint = flag.String("endpoint", "unix://tmp/csi.sock", "CSI endpoint")
34-
driverName = flag.String("drivername", "csi-hostpath", "name of the driver")
34+
driverName = flag.String("drivername", "hostpath.csi.k8s.io", "name of the driver")
3535
nodeID = flag.String("nodeid", "", "node id")
3636
ephemeral = flag.Bool("ephemeral", false, "deploy in ephemeral mode")
3737
showVersion = flag.Bool("version", false, "Show version.")

deploy/kubernetes-1.13/hostpath/csi-hostpath-plugin.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ spec:
6565
- name: hostpath
6666
image: quay.io/k8scsi/hostpathplugin:v1.1.0
6767
args:
68+
- "--drivername=hostpath.csi.k8s.io"
6869
- "--v=5"
6970
- "--endpoint=$(CSI_ENDPOINT)"
7071
- "--nodeid=$(KUBE_NODE_NAME)"

deploy/kubernetes-1.13/snapshotter/csi-hostpath-snapshotclass.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ apiVersion: snapshot.storage.k8s.io/v1alpha1
22
kind: VolumeSnapshotClass
33
metadata:
44
name: csi-hostpath-snapclass
5-
snapshotter: csi-hostpath
5+
snapshotter: hostpath.csi.k8s.io

deploy/kubernetes-1.14/hostpath/csi-hostpath-plugin.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ spec:
6565
- name: hostpath
6666
image: quay.io/k8scsi/hostpathplugin:v1.1.0
6767
args:
68+
- "--drivername=hostpath.csi.k8s.io"
6869
- "--v=5"
6970
- "--endpoint=$(CSI_ENDPOINT)"
7071
- "--nodeid=$(KUBE_NODE_NAME)"

deploy/kubernetes-1.14/snapshotter/csi-hostpath-snapshotclass.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ apiVersion: snapshot.storage.k8s.io/v1alpha1
22
kind: VolumeSnapshotClass
33
metadata:
44
name: csi-hostpath-snapclass
5-
snapshotter: csi-hostpath
5+
snapshotter: hostpath.csi.k8s.io

examples/csi-app-inline.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ spec:
1313
volumes:
1414
- name: my-csi-volume
1515
csi:
16-
driver: csi-hostpath
16+
driver: hostpath.csi.k8s.io

examples/csi-storageclass.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ apiVersion: storage.k8s.io/v1
22
kind: StorageClass
33
metadata:
44
name: csi-hostpath-sc
5-
provisioner: csi-hostpath
5+
provisioner: hostpath.csi.k8s.io
66
reclaimPolicy: Delete
77
volumeBindingMode: Immediate

0 commit comments

Comments
 (0)