Skip to content

Commit d2606da

Browse files
Karol Lateckicyb70289
Karol Latecki
authored andcommitted
Fix markdown files styling issues
Commit contains fixes for various styling issues found in all .md files. Max line lenght configured to 120. MD002 First header should be a top level header MD013 Line length MD022 Headers should be surrounded by blank lines MD029 Ordered list item prefix MD031 Fenced code blocks should be surrounded by blank lines MD032 Lists should be surrounded by blank lines MD034 Bare URL used MD041 First line in file should be a top level header MD047 File should end with a single newline character Change-Id: Ieca2b4fdc28449fab31a1cb9afdde1e0644725b9 Signed-off-by: Karol Latecki <[email protected]> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk-csi/+/7307 Reviewed-by: Yibo Cai <[email protected]> Reviewed-by: Antti Kervinen <[email protected]> Tested-by: SPDK CI Jenkins <[email protected]> Reviewed-by: Kamil Godzwon <[email protected]>
1 parent 95a1911 commit d2606da

File tree

6 files changed

+145
-98
lines changed

6 files changed

+145
-98
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
Please see the [SPDK development guide](http://www.spdk.io/development/) for information on how to contribute to SPDK.
44

5-
The code repo for SPDK-CSI is https://review.spdk.io/spdk/spdk-csi.
5+
The code repo for SPDK-CSI is [https://review.spdk.io/spdk/spdk-csi](https://review.spdk.io/spdk/spdk-csi).

README.md

Lines changed: 92 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22

33
## About
44

5-
This repo contains SPDK CSI ([Container Storage Interface](https://github.com/container-storage-interface/)) plugin for Kubernetes.
5+
This repo contains SPDK CSI ([Container Storage Interface](https://github.com/container-storage-interface/))
6+
plugin for Kubernetes.
67

7-
SPDK CSI plugin brings SPDK to Kubernetes. It provisions SPDK logical volumes on storage node dynamically and enables Pods to access SPDK storage backend through NVMe-oF or iSCSI.
8+
SPDK CSI plugin brings SPDK to Kubernetes. It provisions SPDK logical volumes on storage node dynamically
9+
and enables Pods to access SPDK storage backend through NVMe-oF or iSCSI.
810

9-
Please see [SPDK CSI Design Document](https://docs.google.com/document/d/1aLi6SkNBp__wjG7YkrZu7DdhoftAquZiWiIOMy3hskY/) for detailed introduction.
11+
Please see [SPDK CSI Design Document](https://docs.google.com/document/d/1aLi6SkNBp__wjG7YkrZu7DdhoftAquZiWiIOMy3hskY/)
12+
for detailed introduction.
1013

1114
## Supported platforms
1215

13-
This plugin conforms to [CSI Spec v1.6.0](https://github.com/container-storage-interface/spec/blob/v1.6.0/spec.md). It is currently developed and tested only on Kubernetes.
16+
This plugin conforms to [CSI Spec v1.6.0](https://github.com/container-storage-interface/spec/blob/v1.6.0/spec.md).
17+
It is currently developed and tested only on Kubernetes.
1418

1519
This plugin supports `x86_64` and `Arm64` architectures.
1620

@@ -29,25 +33,36 @@ Minimal requirement: Go 1.19+, Docker 18.03+ and Kubernetes 1.13+.
2933
### Build
3034

3135
- `$ make all`
36+
3237
Build targets spdkcsi, lint, test.
3338

3439
- `$ make spdkcsi`
40+
3541
Build SPDK-CSI binary `_out/spdkcsi`.
3642

3743
- `$ make lint`
44+
3845
Lint code and scripts.
39-
- `$ make golangci`
46+
47+
- `$ make golangci`
48+
4049
Install [golangci-lint](https://github.com/golangci/golangci-lint) and perform various go code static checks.
41-
- `$ make yamllint`
50+
51+
- `$ make yamllint`
52+
4253
Lint yaml files if yamllint is installed. Requires yamllint 1.10+.
4354

4455
- `$ make test`
45-
Verify go modules and run unit tests. Requires SPDK target and JsonRPC HTTP proxy running on localhost. See [deploy/spdk/README](deploy/spdk/README.md) for details.
56+
57+
Verify go modules and run unit tests. Requires SPDK target and JsonRPC HTTP proxy running on localhost.
58+
See [deploy/spdk/README](deploy/spdk/README.md) for details.
4659

4760
- `$ make e2e-test`
61+
4862
Verify core features through Kubernetes end-to-end (e2e) test.
4963

5064
- `$ make image`
65+
5166
Build SPDK-CSI docker image.
5267

5368
### Parameters
@@ -81,8 +96,9 @@ Example deployment files can be found in deploy/kubernetes directory.
8196
---
8297
**_NOTE:_**
8398

84-
Below example is a simplest test system running in a single host or VM. No NVMe device is required, memory based bdev is used instead.
85-
[docs/multi-node.md](docs/multi-node.md) introduces how to deploy SPDKCSI on multiple nodes with NVMe devices.
99+
Below example is a simplest test system running in a single host or VM. No NVMe device is required, memory based bdev
100+
is used instead. [docs/multi-node.md](docs/multi-node.md) introduces how to deploy SPDKCSI on multiple nodes with NVMe
101+
devices.
86102

87103
---
88104

@@ -92,104 +108,105 @@ Follow [deploy/spdk/README](deploy/spdk/README.md) to deploy SPDK storage servic
92108

93109
### Deploy SPDKCSI services
94110

95-
1. Launch Minikube test cluster
111+
1. Launch Minikube test cluster.
96112
```bash
97-
$ cd scripts
98-
$ sudo ./minikube.sh up
99-
100-
# Create kubectl shortcut (assume kubectl version 1.25.0)
101-
$ sudo ln -s /var/lib/minikube/binaries/v1.25.0/kubectl /usr/local/bin/kubectl
102-
103-
# Wait for Kubernetes ready
104-
$ kubectl get pods --all-namespaces
105-
NAMESPACE NAME READY STATUS RESTARTS AGE
106-
kube-system coredns-6955765f44-dlb88 1/1 Running 0 81s
107-
...... ......
108-
kube-system kube-apiserver-spdkcsi-dev 1/1 Running 0 67s
109-
...... ......
113+
$ cd scripts
114+
$ sudo ./minikube.sh up
115+
116+
# Create kubectl shortcut (assume kubectl version 1.25.0)
117+
$ sudo ln -s /var/lib/minikube/binaries/v1.25.0/kubectl /usr/local/bin/kubectl
118+
119+
# Wait for Kubernetes ready
120+
$ kubectl get pods --all-namespaces
121+
NAMESPACE NAME READY STATUS RESTARTS AGE
122+
kube-system coredns-6955765f44-dlb88 1/1 Running 0 81s
123+
...... ......
124+
kube-system kube-apiserver-spdkcsi-dev 1/1 Running 0 67s
125+
...... ......
110126
```
111127

112128
2. Install snapshot controller and CRD
129+
113130
```bash
114-
SNAPSHOT_VERSION="v3.0.3" ./scripts/install-snapshot.sh install
131+
SNAPSHOT_VERSION="v3.0.3" ./scripts/install-snapshot.sh install
115132

116-
# Check status
117-
$ kubectl get pod snapshot-controller-0
118-
NAME READY STATUS RESTARTS AGE
119-
snapshot-controller-0 1/1 Running 0 6m14s
133+
# Check status
134+
$ kubectl get pod snapshot-controller-0
135+
NAME READY STATUS RESTARTS AGE
136+
snapshot-controller-0 1/1 Running 0 6m14s
120137
```
121138

122139
3. Deploy SPDK-CSI services
123140
```bash
124-
$ cd deploy/kubernetes
125-
$ ./deploy.sh
126-
127-
# Check status
128-
$ kubectl get pods
129-
NAME READY STATUS RESTARTS AGE
130-
spdkcsi-controller-0 3/3 Running 0 3m16s
131-
spdkcsi-node-lzvg5 2/2 Running 0 3m16s
141+
$ cd deploy/kubernetes
142+
$ ./deploy.sh
143+
144+
# Check status
145+
$ kubectl get pods
146+
NAME READY STATUS RESTARTS AGE
147+
spdkcsi-controller-0 3/3 Running 0 3m16s
148+
spdkcsi-node-lzvg5 2/2 Running 0 3m16s
132149
```
133150

134151
4. Deploy test pod
135152
```bash
136-
$ cd deploy/kubernetes
137-
$ kubectl apply -f testpod.yaml
153+
$ cd deploy/kubernetes
154+
$ kubectl apply -f testpod.yaml
138155

139-
# Check status
140-
$ kubectl get pv
141-
NAME CAPACITY ... STORAGECLASS REASON AGE
142-
persistentvolume/pvc-... 256Mi ... spdkcsi-sc 43s
156+
# Check status
157+
$ kubectl get pv
158+
NAME CAPACITY ... STORAGECLASS REASON AGE
159+
persistentvolume/pvc-... 256Mi ... spdkcsi-sc 43s
143160

144-
$ kubectl get pvc
145-
NAME ... CAPACITY ACCESS MODES STORAGECLASS AGE
146-
persistentvolumeclaim/spdkcsi-pvc ... 256Mi RWO spdkcsi-sc 44s
161+
$ kubectl get pvc
162+
NAME ... CAPACITY ACCESS MODES STORAGECLASS AGE
163+
persistentvolumeclaim/spdkcsi-pvc ... 256Mi RWO spdkcsi-sc 44s
147164

148-
$ kubectl get pods
149-
NAME READY STATUS RESTARTS AGE
150-
spdkcsi-test 1/1 Running 0 1m31s
165+
$ kubectl get pods
166+
NAME READY STATUS RESTARTS AGE
167+
spdkcsi-test 1/1 Running 0 1m31s
151168

152-
# Check attached spdk volume in test pod
153-
$ kubectl exec spdkcsi-test mount | grep spdkcsi
154-
/dev/disk/by-id/nvme-..._spdkcsi-sn on /spdkvol type ext4 (rw,relatime)
169+
# Check attached spdk volume in test pod
170+
$ kubectl exec spdkcsi-test mount | grep spdkcsi
171+
/dev/disk/by-id/nvme-..._spdkcsi-sn on /spdkvol type ext4 (rw,relatime)
155172
```
156173

157174
5. Deploy PVC snapshot
158-
```bash
159-
# Create snapshot of the bound PVC
160-
$ cd deploy/kubernetes
161-
$ kubectl apply -f snapshot.yaml
162-
163-
# Get details about the snapshot
164-
$ kubectl get volumesnapshot spdk-snapshot
165-
NAME READYTOUSE SOURCEPVC ... SNAPSHOTCLASS AGE
166-
spdk-snapshot false spdkcsi-pvc ... csi-spdk-snapclass 29s
167-
168-
# Get details about the volumesnapshotcontent
169-
kubectl get volumesnapshotcontent
170-
$ kubectl get volumesnapshotcontent
171-
NAME ... READYTOUSE RESTORESIZE DELETIONPOLICY DRIVER VOLUMESNAPSHOTCLASS VOLUMESNAPSHOT AGE
172-
snapcontent-... true 268435456 Delete csi.spdk.io csi-spdk-snapclass spdk-snapshot 29s
173-
```
175+
```bash
176+
# Create snapshot of the bound PVC
177+
$ cd deploy/kubernetes
178+
$ kubectl apply -f snapshot.yaml
179+
180+
# Get details about the snapshot
181+
$ kubectl get volumesnapshot spdk-snapshot
182+
NAME READYTOUSE SOURCEPVC ... SNAPSHOTCLASS AGE
183+
spdk-snapshot false spdkcsi-pvc ... csi-spdk-snapclass 29s
184+
185+
# Get details about the volumesnapshotcontent
186+
kubectl get volumesnapshotcontent
187+
$ kubectl get volumesnapshotcontent
188+
NAME ... READYTOUSE RESTORESIZE DELETIONPOLICY DRIVER VOLUMESNAPSHOTCLASS VOLUMESNAPSHOT AGE
189+
snapcontent-... true 268435456 Delete csi.spdk.io csi-spdk-snapclass spdk-snapshot 29s
190+
```
174191

175192
### Teardown
176193

177194
1. Delete PVC snapshot
178195
```bash
179-
cd deploy/kubernetes
180-
kubectl delete -f snapshot.yaml
196+
cd deploy/kubernetes
197+
kubectl delete -f snapshot.yaml
181198
```
182199

183200
2. Delete test pod
184201
```bash
185-
$ cd deploy/kubernetes
186-
$ kubectl delete -f testpod.yaml
202+
$ cd deploy/kubernetes
203+
$ kubectl delete -f testpod.yaml
187204
```
188205

189206
3. Delete SPDK-CSI services
190207
```bash
191-
$ cd deploy/kubernetes
192-
$ ./deploy.sh teardown
208+
$ cd deploy/kubernetes
209+
$ ./deploy.sh teardown
193210
```
194211

195212
4. Delete snapshot controller and CRD
@@ -199,8 +216,8 @@ Follow [deploy/spdk/README](deploy/spdk/README.md) to deploy SPDK storage servic
199216

200217
5. Teardown Kubernetes test cluster
201218
```bash
202-
$ cd scripts
203-
$ sudo ./minikube.sh clean
219+
$ cd scripts
220+
$ sudo ./minikube.sh clean
204221
```
205222

206223
## Communication and Contribution

charts/spdk-csi/README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,26 @@ Follow this guide to install the SPDK-CSI Driver for Kubernetes.
88

99
### Build image
1010

11-
```console
12-
$ make image
13-
$ cd deploy/spdk
14-
$ sudo docker build -t spdkdev .
15-
```
11+
```console
12+
make image
13+
cd deploy/spdk
14+
sudo docker build -t spdkdev .
15+
```
1616
**_NOTE:_**
17-
Kubernetes nodes must pre-allocate hugepages in order for the node to report its hugepage capacity. A node can pre-allocate huge pages for multiple sizes.
17+
Kubernetes nodes must pre-allocate hugepages in order for the node to report its hugepage capacity.
18+
A node can pre-allocate huge pages for multiple sizes.
1819

1920
## Install latest CSI Driver via `helm install`
2021

2122
```console
22-
$ cd charts
23-
$ helm install spdk-csi ./spdk-csi --namespace spdk-csi
23+
cd charts
24+
helm install spdk-csi ./spdk-csi --namespace spdk-csi
2425
```
2526

2627
## After installation succeeds, you can get a status of Chart
2728

2829
```console
29-
$ helm status "spdk-csi"
30+
helm status "spdk-csi"
3031
```
3132

3233
## Delete Chart

deploy/spdk/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
### About
1+
# About
22

3-
To test SPDKCSI, we need a working SPDK environment. This document explains how to launch SPDK and JsonRPC HTTP proxy on localhost for function tests.
3+
To test SPDKCSI, we need a working SPDK environment. This document explains how to launch SPDK and JsonRPC HTTP proxy
4+
on localhost for function tests.
45

5-
### Step by step
6+
## Step by step
67

78
```bash
89
# build spdk container image
@@ -13,7 +14,8 @@ sudo docker build -t spdkdev .
1314
sudo sh -c 'echo 1024 > /proc/sys/vm/nr_hugepages'
1415

1516
# start spdk target
16-
sudo docker run -it --rm --name spdkdev --privileged --net host -v /dev/hugepages:/dev/hugepages -v /dev/shm:/dev/shm spdkdev /root/spdk/build/bin/spdk_tgt
17+
sudo docker run -it --rm --name spdkdev --privileged --net host \
18+
-v /dev/hugepages:/dev/hugepages -v /dev/shm:/dev/shm spdkdev /root/spdk/build/bin/spdk_tgt
1719
# run below commands in another console
1820

1921
# create 1G malloc bdev
@@ -26,7 +28,7 @@ sudo docker exec -it spdkdev /root/spdk/scripts/rpc.py bdev_lvol_create_lvstore
2628
sudo docker exec -it spdkdev /root/spdk/scripts/rpc_http_proxy.py 127.0.0.1 9009 spdkcsiuser spdkcsipass
2729
```
2830

29-
### Single command
31+
## Single command
3032

3133
Combine above steps to a single command can be convenient. But it's harder to debug if error happens.
3234

0 commit comments

Comments
 (0)