Commit 4a710cf
authored
refactor(dynamic mount): introduce dynamic server manager (#11)
We found that when a pod container is recreated, there's a chance the
dynamically mounted CSI directory gets unmounted. Since this directory
is shared among multiple pod containers via mount propagation from
/var/run/model-csi (a tmpfs), it introduces instability and security
isolation risks, for example, if one pod learns another pod's volume
name, it could maliciously call APIs to mount or unmount that submount
of volume.
To ensure secure isolation for each dynamic mount and avoid unstable
mount propagation, an independent csi.sock is currently created under
each dynamic mount directory instead of using a shared csi.sock, these
individual csi.sock servers are managed by the DynamicServerManager.
Signed-off-by: imeoer <[email protected]>1 parent 7d62a09 commit 4a710cf
File tree
10 files changed
+331
-177
lines changed- pkg
- config
- server
- service
- utils
10 files changed
+331
-177
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| |||
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
138 | 147 | | |
139 | 148 | | |
140 | 149 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | 45 | | |
60 | 46 | | |
61 | 47 | | |
| |||
157 | 143 | | |
158 | 144 | | |
159 | 145 | | |
160 | | - | |
| 146 | + | |
161 | 147 | | |
162 | 148 | | |
163 | 149 | | |
| |||
243 | 229 | | |
244 | 230 | | |
245 | 231 | | |
| 232 | + | |
246 | 233 | | |
247 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
248 | 242 | | |
249 | 243 | | |
250 | 244 | | |
251 | 245 | | |
252 | 246 | | |
253 | | - | |
254 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
255 | 250 | | |
256 | 251 | | |
257 | 252 | | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
| 253 | + | |
266 | 254 | | |
267 | 255 | | |
268 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 6 | | |
10 | 7 | | |
11 | 8 | | |
12 | 9 | | |
13 | | - | |
14 | 10 | | |
15 | 11 | | |
16 | 12 | | |
17 | | - | |
18 | 13 | | |
19 | 14 | | |
20 | 15 | | |
21 | 16 | | |
22 | 17 | | |
23 | 18 | | |
24 | 19 | | |
25 | | - | |
26 | 20 | | |
27 | 21 | | |
28 | | - | |
29 | | - | |
30 | 22 | | |
31 | 23 | | |
32 | 24 | | |
| |||
593 | 585 | | |
594 | 586 | | |
595 | 587 | | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
0 commit comments