File tree 2 files changed +58
-2
lines changed
2 files changed +58
-2
lines changed Original file line number Diff line number Diff line change 122
122
# Wait until all pods are running. We have to make some assumptions
123
123
# about the deployment here, otherwise we wouldn't know what to wait
124
124
# for: the expectation is that we run attacher, provisioner,
125
- # snapshotter and hostpath plugin in the default namespace.
125
+ # snapshotter, socat and hostpath plugin in the default namespace.
126
126
cnt=0
127
- while [ $( kubectl get pods 2> /dev/null | grep ' ^csi-hostpath.* Running ' | wc -l) -lt 4 ]; do
127
+ while [ $( kubectl get pods 2> /dev/null | grep ' ^csi-hostpath.* Running ' | wc -l) -lt 5 ]; do
128
128
if [ $cnt -gt 30 ]; then
129
129
echo " Running pods:"
130
130
kubectl describe pods
Original file line number Diff line number Diff line change
1
+ # This exposes the hostpath's Unix domain csi.sock as a TCP port to the
2
+ # outside world. The mapping from Unix domain socket to TCP is done
3
+ # by socat.
4
+ #
5
+ # This is useful for testing with csi-sanity or csc.
6
+
7
+ apiVersion : v1
8
+ kind : Service
9
+ metadata :
10
+ name : hostpath-service
11
+ spec :
12
+ type : NodePort
13
+ selector :
14
+ app : csi-hostpath-socat
15
+ ports :
16
+ - port : 10000 # fixed port inside the pod, dynamically allocated port outside
17
+ ---
18
+ kind : StatefulSet
19
+ apiVersion : apps/v1
20
+ metadata :
21
+ name : csi-hostpath-socat
22
+ spec :
23
+ serviceName : " csi-hostpath-socat"
24
+ replicas : 1
25
+ selector :
26
+ matchLabels :
27
+ app : csi-hostpath-socat
28
+ template :
29
+ metadata :
30
+ labels :
31
+ app : csi-hostpath-socat
32
+ spec :
33
+ affinity :
34
+ podAffinity :
35
+ requiredDuringSchedulingIgnoredDuringExecution :
36
+ - labelSelector :
37
+ matchExpressions :
38
+ - key : app
39
+ operator : In
40
+ values :
41
+ - csi-hostpathplugin
42
+ topologyKey : kubernetes.io/hostname
43
+ containers :
44
+ - name : socat
45
+ image : alpine/socat:1.0.3
46
+ args :
47
+ - tcp-listen:10000,fork,reuseaddr
48
+ - unix-connect:/csi/csi.sock
49
+ volumeMounts :
50
+ - mountPath : /csi
51
+ name : socket-dir
52
+ volumes :
53
+ - hostPath :
54
+ path : /var/lib/kubelet/plugins/csi-hostpath
55
+ type : DirectoryOrCreate
56
+ name : socket-dir
You can’t perform that action at this time.
0 commit comments