Skip to content

Commit d006278

Browse files
committed
Update readme doc
1 parent 3348ad0 commit d006278

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ The following examples assume that the CSI hostpath driver has been deployed and
2828
- [Volume snapshots](docs/example-snapshots-1.17-and-later.md)
2929
- [Inline ephemeral volumes](docs/example-ephemeral.md)
3030

31-
## Building the binaries
31+
## Build and Test locally
32+
### Building the binaries
3233
If you want to build the driver yourself, you can do so with the following command from the root directory:
3334

3435
```shell
3536
make
3637
```
3738

39+
### Test hostpath driver
40+
See [doc](./pkg/hostpath/README.md)
41+
3842
## Development
3943

4044
### Updating sidecar images

pkg/hostpath/README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,52 +7,58 @@
77
$ make
88
```
99

10+
### Set endpoint
11+
```
12+
$ endpoint=unix:///tmp/csi.sock # unix (default)
13+
$ #endpoint=tcp://127.0.0.1:10000 # tcp
14+
```
15+
1016
### Start Hostpath driver
1117
```
12-
$ sudo ./bin/hostpathplugin --endpoint tcp://127.0.0.1:10000 --nodeid CSINode -v=5
18+
$ sudo ./bin/hostpathplugin --endpoint $endpoint --nodeid CSINode -v=5
1319
```
1420

1521
### Test using csc
1622
Get ```csc``` tool from https://github.com/rexray/gocsi/tree/master/csc
1723

1824
#### Get plugin info
1925
```
20-
$ csc identity plugin-info --endpoint tcp://127.0.0.1:10000
21-
"csi-hostpath" "0.1.0"
26+
$ csc identity plugin-info --endpoint $endpoint
27+
"hostpath.csi.k8s.io" "v1.x.x-xx-xxx"
2228
```
2329

2430
#### Create a volume
2531
```
26-
$ csc controller new --endpoint tcp://127.0.0.1:10000 --cap 1,block CSIVolumeName
32+
$ csc controller new --endpoint $endpoint --cap 1,block CSIVolumeName
2733
CSIVolumeID
2834
```
2935

3036
#### Delete a volume
3137
```
32-
$ csc controller del --endpoint tcp://127.0.0.1:10000 CSIVolumeID
38+
$ csc controller del --endpoint $endpoint CSIVolumeID
3339
CSIVolumeID
3440
```
3541

3642
#### Validate volume capabilities
3743
```
38-
$ csc controller validate-volume-capabilities --endpoint tcp://127.0.0.1:10000 --cap 1,block CSIVolumeID
44+
$ csc controller validate-volume-capabilities --endpoint $endpoint --cap 1,block CSIVolumeID
3945
CSIVolumeID true
4046
```
4147

4248
#### NodePublish a volume
4349
```
44-
$ csc node publish --endpoint tcp://127.0.0.1:10000 --cap 1,block --target-path /mnt/hostpath CSIVolumeID
50+
$ csc node publish --endpoint $endpoint --cap 1,block --target-path /mnt/hostpath CSIVolumeID
4551
CSIVolumeID
4652
```
4753

4854
#### NodeUnpublish a volume
4955
```
50-
$ csc node unpublish --endpoint tcp://127.0.0.1:10000 --target-path /mnt/hostpath CSIVolumeID
56+
$ csc node unpublish --endpoint $endpoint --target-path /mnt/hostpath CSIVolumeID
5157
CSIVolumeID
5258
```
5359

5460
#### Get NodeInfo
5561
```
56-
$ csc node get-info --endpoint tcp://127.0.0.1:10000
62+
$ csc node get-info --endpoint $endpoint
5763
CSINode
5864
```

0 commit comments

Comments
 (0)