Skip to content

Commit 9f8adc7

Browse files
authored
Merge pull request #25 from andyzhangx/cut-v0.1.0
doc: cut v0.1.0 release
2 parents 03e7a51 + 5851e86 commit 9f8adc7

File tree

9 files changed

+344
-12
lines changed

9 files changed

+344
-12
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ This driver allows Kubernetes to use [SMB](https://wiki.wireshark.org/SMB) CSI v
99
### Project status: alpha
1010

1111
### Container Images & Kubernetes Compatibility:
12-
|SMB CSI Driver Version | Image | 1.14+ |
13-
|-------------------------------|----------------------------------------------|--------|
14-
|master branch |mcr.microsoft.com/k8s/csi/smb-csi:latest | yes |
12+
|SMB CSI Driver Version | Image | 1.14+ |
13+
|------------------------|----------------------------------------------|--------|
14+
|master branch |mcr.microsoft.com/k8s/csi/smb-csi:latest | yes |
15+
|v0.1.0 |mcr.microsoft.com/k8s/csi/smb-csi:v0.1.0 | yes |
1516

1617
### Driver parameters
1718
Please refer to [`smb.csi.k8s.io` driver parameters](./docs/driver-parameters.md)

deploy/example/windows/deployment.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,26 @@
22
apiVersion: apps/v1
33
kind: Deployment
44
metadata:
5-
name: aspnet-smb
5+
name: busybox-smb
66
labels:
7-
app: aspnet
7+
app: busybox
88
spec:
99
replicas: 1
1010
template:
1111
metadata:
12-
name: aspnet
12+
name: busybox
1313
labels:
14-
app: aspnet
14+
app: busybox
1515
spec:
1616
nodeSelector:
1717
"kubernetes.io/os": windows
1818
containers:
19-
- name: aspnet
20-
image: mcr.microsoft.com/dotnet/framework/samples:aspnetapp
19+
- name: busybox
20+
image: e2eteam/busybox:1.29
21+
command:
22+
- "powershell.exe"
23+
- "-Command"
24+
- "while (1) { Add-Content -Encoding Ascii C:\\mnt\\smb\\data.txt $(Get-Date -Format u); sleep 1 }"
2125
volumeMounts:
2226
- name: smb
2327
mountPath: "/mnt/smb"
@@ -27,4 +31,4 @@ spec:
2731
claimName: pvc-smb
2832
selector:
2933
matchLabels:
30-
app: aspnet
34+
app: busybox
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1beta1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
creationTimestamp: null
6+
name: csinodeinfos.csi.storage.k8s.io
7+
spec:
8+
group: csi.storage.k8s.io
9+
names:
10+
kind: CSINodeInfo
11+
plural: csinodeinfos
12+
scope: Cluster
13+
validation:
14+
openAPIV3Schema:
15+
properties:
16+
csiDrivers:
17+
description: List of CSI drivers running on the node and their properties.
18+
items:
19+
properties:
20+
driver:
21+
description: The CSI driver that this object refers to.
22+
type: string
23+
nodeID:
24+
description: The node from the driver point of view.
25+
type: string
26+
topologyKeys:
27+
description: List of keys supported by the driver.
28+
items:
29+
type: string
30+
type: array
31+
type: array
32+
version: v1alpha1
33+
status:
34+
acceptedNames:
35+
kind: ""
36+
plural: ""
37+
conditions: []
38+
storedVersions: []

deploy/v0.1.0/csi-smb-driver.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
apiVersion: storage.k8s.io/v1beta1
3+
kind: CSIDriver
4+
metadata:
5+
name: smb.csi.k8s.io
6+
spec:
7+
attachRequired: false
8+
podInfoOnMount: true
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
---
2+
kind: DaemonSet
3+
apiVersion: apps/v1
4+
metadata:
5+
name: csi-smb-node-win
6+
namespace: kube-system
7+
spec:
8+
selector:
9+
matchLabels:
10+
app: csi-smb-node-win
11+
template:
12+
metadata:
13+
labels:
14+
app: csi-smb-node-win
15+
spec:
16+
nodeSelector:
17+
kubernetes.io/os: windows
18+
priorityClassName: system-node-critical
19+
containers:
20+
- name: liveness-probe
21+
volumeMounts:
22+
- mountPath: C:\csi
23+
name: plugin-dir
24+
image: mcr.microsoft.com/oss/kubernetes-csi/livenessprobe:v2.0.1-alpha.1-windows-1809-amd64
25+
args:
26+
- --csi-address=$(CSI_ENDPOINT)
27+
- --probe-timeout=3s
28+
- --health-port=39613
29+
- --v=5
30+
env:
31+
- name: CSI_ENDPOINT
32+
value: unix://C:\\csi\\csi.sock
33+
resources:
34+
limits:
35+
cpu: 2
36+
memory: 2Gi
37+
requests:
38+
cpu: 10m
39+
memory: 20Mi
40+
- name: node-driver-registrar
41+
image: mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar:v1.2.1-alpha.1-windows-1809-amd64
42+
args:
43+
- --v=5
44+
- --csi-address=$(CSI_ENDPOINT)
45+
- --kubelet-registration-path=C:\\var\\lib\\kubelet\\plugins\\smb.csi.k8s.io\\csi.sock
46+
env:
47+
- name: CSI_ENDPOINT
48+
value: unix://C:\\csi\\csi.sock
49+
- name: KUBE_NODE_NAME
50+
valueFrom:
51+
fieldRef:
52+
fieldPath: spec.nodeName
53+
volumeMounts:
54+
- name: kubelet-dir
55+
mountPath: "C:\\var\\lib\\kubelet"
56+
- name: plugin-dir
57+
mountPath: C:\csi
58+
- name: registration-dir
59+
mountPath: C:\registration
60+
resources:
61+
limits:
62+
cpu: 2
63+
memory: 2Gi
64+
requests:
65+
cpu: 10m
66+
memory: 20Mi
67+
- name: smb
68+
image: mcr.microsoft.com/k8s/csi/smb-csi:latest
69+
args:
70+
- --v=5
71+
- --endpoint=$(CSI_ENDPOINT)
72+
- --nodeid=$(KUBE_NODE_NAME)
73+
ports:
74+
- containerPort: 39613
75+
name: healthz
76+
protocol: TCP
77+
- containerPort: 39615
78+
name: metrics
79+
protocol: TCP
80+
livenessProbe:
81+
failureThreshold: 5
82+
httpGet:
83+
path: /healthz
84+
port: healthz
85+
initialDelaySeconds: 30
86+
timeoutSeconds: 10
87+
periodSeconds: 30
88+
env:
89+
- name: CSI_ENDPOINT
90+
value: unix://C:\\csi\\csi.sock
91+
- name: KUBE_NODE_NAME
92+
valueFrom:
93+
fieldRef:
94+
apiVersion: v1
95+
fieldPath: spec.nodeName
96+
securityContext:
97+
privileged: true
98+
volumeMounts:
99+
- name: kubelet-dir
100+
mountPath: "C:\\var\\lib\\kubelet"
101+
- name: plugin-dir
102+
mountPath: C:\csi
103+
- name: csi-proxy-fs-pipe
104+
mountPath: \\.\pipe\csi-proxy-filesystem-v1alpha1
105+
- name: csi-proxy-smb-pipe
106+
mountPath: \\.\pipe\csi-proxy-smb-v1alpha1
107+
resources:
108+
limits:
109+
cpu: 2
110+
memory: 2Gi
111+
requests:
112+
cpu: 10m
113+
memory: 20Mi
114+
volumes:
115+
- name: csi-proxy-fs-pipe
116+
hostPath:
117+
path: \\.\pipe\csi-proxy-filesystem-v1alpha1
118+
type: ""
119+
- name: csi-proxy-smb-pipe
120+
hostPath:
121+
path: \\.\pipe\csi-proxy-smb-v1alpha1
122+
type: ""
123+
- name: registration-dir
124+
hostPath:
125+
path: C:\var\lib\kubelet\plugins_registry\
126+
type: Directory
127+
- name: kubelet-dir
128+
hostPath:
129+
path: C:\var\lib\kubelet\
130+
type: Directory
131+
- name: plugin-dir
132+
hostPath:
133+
path: C:\var\lib\kubelet\plugins\smb.csi.k8s.io\
134+
type: DirectoryOrCreate

deploy/v0.1.0/csi-smb-node.yaml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
---
2+
kind: DaemonSet
3+
apiVersion: apps/v1
4+
metadata:
5+
name: csi-smb-node
6+
namespace: kube-system
7+
spec:
8+
selector:
9+
matchLabels:
10+
app: csi-smb-node
11+
template:
12+
metadata:
13+
labels:
14+
app: csi-smb-node
15+
spec:
16+
nodeSelector:
17+
kubernetes.io/os: linux
18+
priorityClassName: system-node-critical
19+
tolerations:
20+
- operator: "Exists"
21+
containers:
22+
- name: liveness-probe
23+
volumeMounts:
24+
- mountPath: /csi
25+
name: socket-dir
26+
image: mcr.microsoft.com/oss/kubernetes-csi/livenessprobe:v1.1.0
27+
args:
28+
- --csi-address=/csi/csi.sock
29+
- --connection-timeout=3s
30+
- --health-port=39613
31+
- --v=5
32+
resources:
33+
limits:
34+
cpu: 1
35+
memory: 1Gi
36+
requests:
37+
cpu: 10m
38+
memory: 20Mi
39+
- name: node-driver-registrar
40+
image: mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar:v1.2.0
41+
args:
42+
- --csi-address=$(ADDRESS)
43+
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
44+
- --v=5
45+
lifecycle:
46+
preStop:
47+
exec:
48+
command: ["/bin/sh", "-c", "rm -rf /registration/smb.csi.k8s.io-reg.sock /csi/csi.sock"]
49+
env:
50+
- name: ADDRESS
51+
value: /csi/csi.sock
52+
- name: DRIVER_REG_SOCK_PATH
53+
value: /var/lib/kubelet/plugins/smb.csi.k8s.io/csi.sock
54+
volumeMounts:
55+
- name: socket-dir
56+
mountPath: /csi
57+
- name: registration-dir
58+
mountPath: /registration
59+
resources:
60+
limits:
61+
cpu: 1
62+
memory: 1Gi
63+
requests:
64+
cpu: 10m
65+
memory: 20Mi
66+
- name: smb
67+
image: mcr.microsoft.com/k8s/csi/smb-csi:latest
68+
args:
69+
- "--v=5"
70+
- "--endpoint=$(CSI_ENDPOINT)"
71+
- "--nodeid=$(KUBE_NODE_NAME)"
72+
ports:
73+
- containerPort: 39613
74+
name: healthz
75+
protocol: TCP
76+
- containerPort: 39615
77+
name: metrics
78+
protocol: TCP
79+
livenessProbe:
80+
failureThreshold: 5
81+
httpGet:
82+
path: /healthz
83+
port: healthz
84+
initialDelaySeconds: 30
85+
timeoutSeconds: 10
86+
periodSeconds: 30
87+
env:
88+
- name: CSI_ENDPOINT
89+
value: unix:///csi/csi.sock
90+
- name: KUBE_NODE_NAME
91+
valueFrom:
92+
fieldRef:
93+
apiVersion: v1
94+
fieldPath: spec.nodeName
95+
securityContext:
96+
privileged: true
97+
volumeMounts:
98+
- mountPath: /csi
99+
name: socket-dir
100+
- mountPath: /var/lib/kubelet/
101+
mountPropagation: Bidirectional
102+
name: mountpoint-dir
103+
resources:
104+
limits:
105+
cpu: 1
106+
memory: 1Gi
107+
requests:
108+
cpu: 10m
109+
memory: 20Mi
110+
volumes:
111+
- hostPath:
112+
path: /var/lib/kubelet/plugins/smb.csi.k8s.io
113+
type: DirectoryOrCreate
114+
name: socket-dir
115+
- hostPath:
116+
path: /var/lib/kubelet/
117+
type: DirectoryOrCreate
118+
name: mountpoint-dir
119+
- hostPath:
120+
path: /var/lib/kubelet/plugins_registry/
121+
type: DirectoryOrCreate
122+
name: registration-dir
123+
---

docs/install-csi-driver-master.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/maste
77

88
- check pods status:
99
```console
10-
kubectl -n kube-system get pod -o wide --watch -l app=csi-smb-controller
1110
kubectl -n kube-system get pod -o wide --watch -l app=csi-smb-node
1211
```
1312

docs/install-csi-driver-v0.1.0.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Install SMB CSI driver v0.1.0 version on a Kubernetes cluster
2+
3+
### Install by kubectl
4+
```console
5+
curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/v0.1.0/deploy/install-driver.sh | bash -s v0.1.0 --
6+
```
7+
8+
- check pods status:
9+
```console
10+
kubectl -n kube-system get pod -o wide --watch -l app=csi-smb-node
11+
```
12+
13+
example output:
14+
15+
```
16+
NAME READY STATUS RESTARTS AGE IP NODE
17+
csi-smb-node-cvgbs 3/3 Running 0 7m4s 10.240.0.35 k8s-agentpool-22533604-1
18+
csi-smb-node-dr4s4 3/3 Running 0 7m4s 10.240.0.4 k8s-agentpool-22533604-0
19+
```
20+
21+
### clean up SMB CSI driver
22+
```console
23+
curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/v0.1.0/deploy/uninstall-driver.sh | bash -s --
24+
```

docs/install-smb-csi-driver.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
## Install smb CSI driver on a Kubernetes cluster
22

3-
- [install CSI driver master version](./install-csi-driver-master.md)
3+
- [install CSI driver master version](./install-csi-driver-master.md)
4+
- [install CSI driver v0.1.0 version](./install-csi-driver-v0.1.0.md)

0 commit comments

Comments
 (0)