@@ -20,18 +20,24 @@ service Filesystem {
20
20
21
21
// Context of the paths used for path prefix validation
22
22
enum PathContext {
23
- // Indicates the kubelet-csi-plugins-path parameter of csi-proxy be used as the path context
23
+ // Indicates the kubelet-csi-plugins-path parameter of csi-proxy be used as
24
+ // the path context. This may be used while handling NodeStageVolume where
25
+ // a volume may need to be mounted at a plugin-specific path like:
26
+ // kubelet\plugins\kubernetes.io\csi\pv\<pv-name>\globalmount
24
27
PLUGIN = 0 ;
25
- // Indicates the kubelet-pod-path parameter of csi-proxy be used as the path context
26
- CONTAINER = 1 ;
28
+ // Indicates the kubelet-pod-path parameter of csi-proxy be used as the path
29
+ // context. This may be used while handling NodePublishVolume where a staged
30
+ // volume may be need to be symlinked to a pod-specific path like:
31
+ // kubelet\pods\<pod-uuid>\volumes\kubernetes.io~csi\<pvc-name>\mount
32
+ POD = 1 ;
27
33
}
28
34
29
35
message PathExistsRequest {
30
36
// The path whose existence we want to check in the host's filesystem
31
37
string path = 1 ;
32
38
33
39
// Context of the path parameter.
34
- // This is used to determine the root for relative path parameters
40
+ // This is used to validate prefix for absolute paths passed
35
41
PathContext context = 2 ;
36
42
}
37
43
@@ -53,24 +59,19 @@ message MkdirRequest {
53
59
// User account under which csi-proxy is started (typically LocalSystem).
54
60
//
55
61
// Restrictions:
56
- // If an absolute path (indicated by a drive letter prefix: e.g. "C:\") is passed,
57
- // depending on the context parameter of this function, the path prefix needs
62
+ // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted.
63
+ // Depending on the context parameter of this function, the path prefix needs
58
64
// to match the paths specified either as kubelet-csi-plugins-path
59
65
// or as kubelet-pod-path parameters of csi-proxy.
60
- // If a relative path is passed, depending on the context parameter of this
61
- // function, the path will be considered relative to the path specified either as
62
- // kubelet-csi-plugins-path or as kubelet-pod-path parameters of csi-proxy.
63
- // The path parameter cannot already exist on host filesystem.
66
+ // The path parameter cannot already exist in the host's filesystem.
64
67
// UNC paths of the form "\\server\share\path\file" are not allowed.
65
68
// All directory separators need to be backslash character: "\".
66
69
// Characters: .. / : | ? * in the path are not allowed.
67
70
// Maximum path length will be capped to 260 characters.
68
71
string path = 1 ;
69
72
70
73
// Context of the path parameter.
71
- // This is used to [1] determine the root for relative path parameters
72
- // or [2] validate prefix for absolute paths (indicated by a drive letter
73
- // prefix: e.g. "C:\")
74
+ // This is used to validate prefix for absolute paths passed
74
75
PathContext context = 2 ;
75
76
}
76
77
@@ -86,25 +87,23 @@ message RmdirRequest {
86
87
// https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
87
88
//
88
89
// Restrictions:
89
- // If an absolute path (indicated by a drive letter prefix: e.g. "C:\") is passed,
90
- // depending on the context parameter of this function, the path prefix needs
90
+ // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted.
91
+ // Depending on the context parameter of this function, the path prefix needs
91
92
// to match the paths specified either as kubelet-csi-plugins-path
92
93
// or as kubelet-pod-path parameters of csi-proxy.
93
- // If a relative path is passed, depending on the context parameter of this
94
- // function, the path will be considered relative to the path specified either as
95
- // kubelet-csi-plugins-path or as kubelet-pod-path parameters of csi-proxy.
96
94
// UNC paths of the form "\\server\share\path\file" are not allowed.
97
95
// All directory separators need to be backslash character: "\".
98
96
// Characters: .. / : | ? * in the path are not allowed.
99
97
// Path cannot be a file of type symlink.
100
98
// Maximum path length will be capped to 260 characters.
101
99
string path = 1 ;
102
100
103
- // Context of the path creation used for path prefix validation
104
- // This is used to [1] determine the root for relative path parameters
105
- // or [2] validate prefix for absolute paths (indicated by a drive letter
106
- // prefix: e.g. "C:\")
101
+ // Context of the path parameter.
102
+ // This is used to validate prefix for absolute paths passed
107
103
PathContext context = 2 ;
104
+
105
+ // Force remove all contents under path (if any).
106
+ bool force = 3 ;
108
107
}
109
108
110
109
message RmdirResponse {
@@ -119,11 +118,9 @@ message LinkPathRequest {
119
118
// https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
120
119
//
121
120
// Restrictions:
122
- // If an absolute path (indicated by a drive letter prefix: e.g. "C:\") is passed,
123
- // the path prefix needs to match the path specified as kubelet-csi-plugins-path
124
- // parameter of csi-proxy.
125
- // If a relative path is passed, the path will be considered relative to the
126
- // path specified as kubelet-csi-plugins-path parameter of csi-proxy.
121
+ // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted.
122
+ // The path prefix needs needs to match the paths specified as
123
+ // kubelet-csi-plugins-path parameter of csi-proxy.
127
124
// UNC paths of the form "\\server\share\path\file" are not allowed.
128
125
// All directory separators need to be backslash character: "\".
129
126
// Characters: .. / : | ? * in the path are not allowed.
@@ -137,11 +134,9 @@ message LinkPathRequest {
137
134
// https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
138
135
//
139
136
// Restrictions:
140
- // If an absolute path (indicated by a drive letter prefix: e.g. "C:\") is passed,
141
- // the path prefix needs to match the path specified as kubelet-pod-path
142
- // parameter of csi-proxy.
143
- // If a relative path is passed, the path will be considered relative to the
144
- // path specified as kubelet-pod-path parameter of csi-proxy.
137
+ // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted.
138
+ // The path prefix needs to match the paths specified as
139
+ // kubelet-pod-path parameter of csi-proxy.
145
140
// UNC paths of the form "\\server\share\path\file" are not allowed.
146
141
// All directory separators need to be backslash character: "\".
147
142
// Characters: .. / : | ? * in the path are not allowed.
0 commit comments