Commit 02be94f
committed
feat: add RBAC permissions and fix pod reconciler for DaemonSet mount mode
This commit completes the DaemonSet mount mode implementation with several critical fixes:
RBAC Updates:
- Add DaemonSet permissions (get, list, watch, create, update, patch) to CSI node service account
- Update both k8s.yaml and k8s_before_v1_18.yaml deployment manifests
- Enable CSI node pods to manage DaemonSets for mount pod lifecycle
Pod Reconciler Improvements:
- Add logic to detect mount mode transitions (shared-pod to DaemonSet)
- Prevent recreation loops when switching between mount modes
- Skip pod recreation when DaemonSet mode is active for a StorageClass
- Properly clean up finalizers to allow seamless mode transitions
Documentation:
- Clarify all three mount modes: pvc, shared-pod, and daemonset
- Document RBAC requirements for DaemonSet operations
- Specify that nodeAffinity is only required for daemonset mode
- Add comprehensive setup instructions including controller env variable requirement
- Include example ConfigMap with proper mode configuration
ConfigMap Template:
- Update example mount-config.yaml with correct nodeAffinity selector
- Show proper mode configuration for both default and specific StorageClasses
These changes enable smooth operation of DaemonSet mount mode and proper
handling of transitions between different mount modes without manual intervention.1 parent 1df1d64 commit 02be94f
File tree
5 files changed
+102
-23
lines changed- deploy
- kubernetes/csi-daemonset-mount
- docs/en/guide
- pkg/controller
5 files changed
+102
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
259 | 270 | | |
260 | 271 | | |
261 | 272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
259 | 270 | | |
260 | 271 | | |
261 | 272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
16 | 38 | | |
17 | | - | |
| 39 | + | |
18 | 40 | | |
19 | | - | |
| 41 | + | |
20 | 42 | | |
21 | 43 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
25 | 55 | | |
26 | 56 | | |
27 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
28 | 62 | | |
29 | | - | |
| 63 | + | |
30 | 64 | | |
31 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
32 | 68 | | |
33 | | - | |
| 69 | + | |
34 | 70 | | |
35 | | - | |
| 71 | + | |
36 | 72 | | |
37 | 73 | | |
38 | 74 | | |
| |||
43 | 79 | | |
44 | 80 | | |
45 | 81 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 82 | + | |
| 83 | + | |
52 | 84 | | |
53 | 85 | | |
54 | | - | |
55 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
56 | 89 | | |
57 | 90 | | |
58 | 91 | | |
59 | | - | |
| 92 | + | |
60 | 93 | | |
61 | 94 | | |
62 | | - | |
| 95 | + | |
63 | 96 | | |
64 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
65 | 103 | | |
66 | 104 | | |
67 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
465 | 484 | | |
466 | 485 | | |
467 | 486 | | |
| |||
0 commit comments