Skip to content

Commit

Permalink
deployment: hostpath.csi.k8s.io as driver name
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pohly committed Jul 9, 2019
1 parent 6128d3d commit ca78448
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions .prow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ CSI_PROW_GINKO_PARALLEL="-p -nodes 40" # default was 7
#CSI_PROW_BUILD_JOB=false
#CSI_PROW_KUBERNETES_VERSION=latest
#CSI_PROW_HOSTPATH_CANARY=canary
CSI_PROW_HOSTPATH_DRIVER_NAME="hostpath.csi.k8s.io"

CSI_PROW_TESTS_SANITY="sanity"

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Since volume snapshot is an alpha feature starting in Kubernetes v1.12, you need
> Resource Version: 2418
> Self Link: /apis/snapshot.storage.k8s.io/v1alpha1/volumesnapshotclasses/csi-hostpath-snapclass
> UID: c8f5bc47-c716-11e8-8911-000c2967769a
> Snapshotter: csi-hostpath
> Snapshotter: hostpath.csi.k8s.io
> Events: <none>
> ```
Expand Down Expand Up @@ -300,7 +300,7 @@ use the volume snapshot class to dynamically create a volume snapshot:
> Spec:
> Csi Volume Snapshot Source:
> Creation Time: 1538576205471577525
> Driver: csi-hostpath
> Driver: hostpath.csi.k8s.io
> Restore Size: 1073741824
> Snapshot Handle: f55ff979-c716-11e8-bb16-000c2967769a
> Deletion Policy: Delete
Expand Down Expand Up @@ -388,7 +388,7 @@ spec:
volumes:
- name: my-csi-volume
csi:
driver: csi-hostpath
driver: hostpath.csi.k8s.io
```

> See sample YAML file [here](./examples/csi-app-inline.yaml).
Expand Down
2 changes: 1 addition & 1 deletion cmd/hostpathplugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func init() {

var (
endpoint = flag.String("endpoint", "unix://tmp/csi.sock", "CSI endpoint")
driverName = flag.String("drivername", "csi-hostpath", "name of the driver")
driverName = flag.String("drivername", "hostpath.csi.k8s.io", "name of the driver")
nodeID = flag.String("nodeid", "", "node id")
ephemeral = flag.Bool("ephemeral", false, "deploy in ephemeral mode")
showVersion = flag.Bool("version", false, "Show version.")
Expand Down
1 change: 1 addition & 0 deletions deploy/kubernetes-1.13/hostpath/csi-hostpath-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ spec:
- name: hostpath
image: quay.io/k8scsi/hostpathplugin:v1.1.0
args:
- "--drivername=hostpath.csi.k8s.io"
- "--v=5"
- "--endpoint=$(CSI_ENDPOINT)"
- "--nodeid=$(KUBE_NODE_NAME)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: snapshot.storage.k8s.io/v1alpha1
kind: VolumeSnapshotClass
metadata:
name: csi-hostpath-snapclass
snapshotter: csi-hostpath
snapshotter: hostpath.csi.k8s.io
1 change: 1 addition & 0 deletions deploy/kubernetes-1.14/hostpath/csi-hostpath-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ spec:
- name: hostpath
image: quay.io/k8scsi/hostpathplugin:v1.1.0
args:
- "--drivername=hostpath.csi.k8s.io"
- "--v=5"
- "--endpoint=$(CSI_ENDPOINT)"
- "--nodeid=$(KUBE_NODE_NAME)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: snapshot.storage.k8s.io/v1alpha1
kind: VolumeSnapshotClass
metadata:
name: csi-hostpath-snapclass
snapshotter: csi-hostpath
snapshotter: hostpath.csi.k8s.io
2 changes: 1 addition & 1 deletion examples/csi-app-inline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ spec:
volumes:
- name: my-csi-volume
csi:
driver: csi-hostpath
driver: hostpath.csi.k8s.io
2 changes: 1 addition & 1 deletion examples/csi-storageclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: csi-hostpath-sc
provisioner: csi-hostpath
provisioner: hostpath.csi.k8s.io
reclaimPolicy: Delete
volumeBindingMode: Immediate

0 comments on commit ca78448

Please sign in to comment.