diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e020a8fe..654e3f8b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -25,7 +25,7 @@ jobs: run: | # start the CSI Proxy before running tests on windows Start-Job -Name CSIProxy -ScriptBlock { - .\bin\csi-proxy.exe --kubelet-csi-plugins-path $pwd --kubelet-pod-path $pwd + .\bin\csi-proxy.exe }; Start-Sleep -Seconds 30; Write-Output "getting named pipes" @@ -47,4 +47,4 @@ jobs: uses: actions/checkout@v2 - name: Run Windows Unit Tests run: | - go test -v -race ./internal/... \ No newline at end of file + go test -v -race ./internal/... diff --git a/client/api/filesystem/v1beta2/api.pb.go b/client/api/filesystem/v1beta2/api.pb.go index 0219d023..c54cd7b8 100644 --- a/client/api/filesystem/v1beta2/api.pb.go +++ b/client/api/filesystem/v1beta2/api.pb.go @@ -24,61 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Context of the paths used for path prefix validation -type PathContext int32 - -const ( - // Indicates the kubelet-csi-plugins-path parameter of csi-proxy be used as - // the path context. This may be used while handling NodeStageVolume where - // a volume may need to be mounted at a plugin-specific path like: - // kubelet\plugins\kubernetes.io\csi\pv\\globalmount - PathContext_PLUGIN PathContext = 0 - // Indicates the kubelet-pod-path parameter of csi-proxy be used as the path - // context. This may be used while handling NodePublishVolume where a staged - // volume may be need to be symlinked to a pod-specific path like: - // kubelet\pods\\volumes\kubernetes.io~csi\\mount - PathContext_POD PathContext = 1 -) - -// Enum value maps for PathContext. -var ( - PathContext_name = map[int32]string{ - 0: "PLUGIN", - 1: "POD", - } - PathContext_value = map[string]int32{ - "PLUGIN": 0, - "POD": 1, - } -) - -func (x PathContext) Enum() *PathContext { - p := new(PathContext) - *p = x - return p -} - -func (x PathContext) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PathContext) Descriptor() protoreflect.EnumDescriptor { - return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_enumTypes[0].Descriptor() -} - -func (PathContext) Type() protoreflect.EnumType { - return &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_enumTypes[0] -} - -func (x PathContext) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PathContext.Descriptor instead. -func (PathContext) EnumDescriptor() ([]byte, []int) { - return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_rawDescGZIP(), []int{0} -} - type PathExistsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -86,9 +31,6 @@ type PathExistsRequest struct { // The path whose existence we want to check in the host's filesystem Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - Context PathContext `protobuf:"varint,2,opt,name=context,proto3,enum=v1beta2.PathContext" json:"context,omitempty"` } func (x *PathExistsRequest) Reset() { @@ -130,13 +72,6 @@ func (x *PathExistsRequest) GetPath() string { return "" } -func (x *PathExistsRequest) GetContext() PathContext { - if x != nil { - return x.Context - } - return PathContext_PLUGIN -} - type PathExistsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -209,9 +144,6 @@ type MkdirRequest struct { // Characters: .. / : | ? * in the path are not allowed. // Maximum path length will be capped to 260 characters. Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - Context PathContext `protobuf:"varint,2,opt,name=context,proto3,enum=v1beta2.PathContext" json:"context,omitempty"` } func (x *MkdirRequest) Reset() { @@ -253,13 +185,6 @@ func (x *MkdirRequest) GetPath() string { return "" } -func (x *MkdirRequest) GetContext() PathContext { - if x != nil { - return x.Context - } - return PathContext_PLUGIN -} - type MkdirResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -319,11 +244,8 @@ type RmdirRequest struct { // Path cannot be a file of type symlink. // Maximum path length will be capped to 260 characters. Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - Context PathContext `protobuf:"varint,2,opt,name=context,proto3,enum=v1beta2.PathContext" json:"context,omitempty"` // Force remove all contents under path (if any). - Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"` + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` } func (x *RmdirRequest) Reset() { @@ -365,13 +287,6 @@ func (x *RmdirRequest) GetPath() string { return "" } -func (x *RmdirRequest) GetContext() PathContext { - if x != nil { - return x.Context - } - return PathContext_PLUGIN -} - func (x *RmdirRequest) GetForce() bool { if x != nil { return x.Force @@ -643,28 +558,19 @@ var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_p 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x22, 0x57, 0x0a, 0x11, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x22, 0x27, 0x0a, 0x11, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, - 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x14, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, + 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0x0a, 0x12, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x52, 0x0a, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x22, 0x0a, 0x0c, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x61, 0x74, - 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x22, 0x0f, 0x0a, 0x0d, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x68, 0x0a, 0x0c, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x68, 0x22, 0x0f, 0x0a, 0x0d, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x38, 0x0a, 0x0c, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x32, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x0f, 0x0a, 0x0d, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, @@ -678,37 +584,34 @@ var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_p 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x32, 0x0a, 0x11, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x2a, 0x22, 0x0a, 0x0b, - 0x50, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x50, - 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x4f, 0x44, 0x10, 0x01, - 0x32, 0xe1, 0x02, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, - 0x47, 0x0a, 0x0a, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1a, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x32, 0xe1, 0x02, 0x0a, + 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x47, 0x0a, 0x0a, 0x50, + 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x05, 0x4d, 0x6b, 0x64, 0x69, - 0x72, 0x12, 0x15, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4d, 0x6b, 0x64, 0x69, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x32, 0x2e, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x38, 0x0a, 0x05, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x12, 0x15, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x6d, 0x64, - 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x1d, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, - 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, - 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, - 0x0a, 0x09, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x19, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, - 0x2e, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, - 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x05, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x12, 0x15, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4d, + 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x38, + 0x0a, 0x05, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x12, 0x15, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x1d, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x09, 0x49, 0x73, + 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x19, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x49, 0x73, 0x53, + 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, + 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, + 0x69, 0x2d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -723,40 +626,35 @@ func file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_ return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_rawDescData } -var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_goTypes = []interface{}{ - (PathContext)(0), // 0: v1beta2.PathContext - (*PathExistsRequest)(nil), // 1: v1beta2.PathExistsRequest - (*PathExistsResponse)(nil), // 2: v1beta2.PathExistsResponse - (*MkdirRequest)(nil), // 3: v1beta2.MkdirRequest - (*MkdirResponse)(nil), // 4: v1beta2.MkdirResponse - (*RmdirRequest)(nil), // 5: v1beta2.RmdirRequest - (*RmdirResponse)(nil), // 6: v1beta2.RmdirResponse - (*CreateSymlinkRequest)(nil), // 7: v1beta2.CreateSymlinkRequest - (*CreateSymlinkResponse)(nil), // 8: v1beta2.CreateSymlinkResponse - (*IsSymlinkRequest)(nil), // 9: v1beta2.IsSymlinkRequest - (*IsSymlinkResponse)(nil), // 10: v1beta2.IsSymlinkResponse + (*PathExistsRequest)(nil), // 0: v1beta2.PathExistsRequest + (*PathExistsResponse)(nil), // 1: v1beta2.PathExistsResponse + (*MkdirRequest)(nil), // 2: v1beta2.MkdirRequest + (*MkdirResponse)(nil), // 3: v1beta2.MkdirResponse + (*RmdirRequest)(nil), // 4: v1beta2.RmdirRequest + (*RmdirResponse)(nil), // 5: v1beta2.RmdirResponse + (*CreateSymlinkRequest)(nil), // 6: v1beta2.CreateSymlinkRequest + (*CreateSymlinkResponse)(nil), // 7: v1beta2.CreateSymlinkResponse + (*IsSymlinkRequest)(nil), // 8: v1beta2.IsSymlinkRequest + (*IsSymlinkResponse)(nil), // 9: v1beta2.IsSymlinkResponse } var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_depIdxs = []int32{ - 0, // 0: v1beta2.PathExistsRequest.context:type_name -> v1beta2.PathContext - 0, // 1: v1beta2.MkdirRequest.context:type_name -> v1beta2.PathContext - 0, // 2: v1beta2.RmdirRequest.context:type_name -> v1beta2.PathContext - 1, // 3: v1beta2.Filesystem.PathExists:input_type -> v1beta2.PathExistsRequest - 3, // 4: v1beta2.Filesystem.Mkdir:input_type -> v1beta2.MkdirRequest - 5, // 5: v1beta2.Filesystem.Rmdir:input_type -> v1beta2.RmdirRequest - 7, // 6: v1beta2.Filesystem.CreateSymlink:input_type -> v1beta2.CreateSymlinkRequest - 9, // 7: v1beta2.Filesystem.IsSymlink:input_type -> v1beta2.IsSymlinkRequest - 2, // 8: v1beta2.Filesystem.PathExists:output_type -> v1beta2.PathExistsResponse - 4, // 9: v1beta2.Filesystem.Mkdir:output_type -> v1beta2.MkdirResponse - 6, // 10: v1beta2.Filesystem.Rmdir:output_type -> v1beta2.RmdirResponse - 8, // 11: v1beta2.Filesystem.CreateSymlink:output_type -> v1beta2.CreateSymlinkResponse - 10, // 12: v1beta2.Filesystem.IsSymlink:output_type -> v1beta2.IsSymlinkResponse - 8, // [8:13] is the sub-list for method output_type - 3, // [3:8] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 0, // 0: v1beta2.Filesystem.PathExists:input_type -> v1beta2.PathExistsRequest + 2, // 1: v1beta2.Filesystem.Mkdir:input_type -> v1beta2.MkdirRequest + 4, // 2: v1beta2.Filesystem.Rmdir:input_type -> v1beta2.RmdirRequest + 6, // 3: v1beta2.Filesystem.CreateSymlink:input_type -> v1beta2.CreateSymlinkRequest + 8, // 4: v1beta2.Filesystem.IsSymlink:input_type -> v1beta2.IsSymlinkRequest + 1, // 5: v1beta2.Filesystem.PathExists:output_type -> v1beta2.PathExistsResponse + 3, // 6: v1beta2.Filesystem.Mkdir:output_type -> v1beta2.MkdirResponse + 5, // 7: v1beta2.Filesystem.Rmdir:output_type -> v1beta2.RmdirResponse + 7, // 8: v1beta2.Filesystem.CreateSymlink:output_type -> v1beta2.CreateSymlinkResponse + 9, // 9: v1beta2.Filesystem.IsSymlink:output_type -> v1beta2.IsSymlinkResponse + 5, // [5:10] is the sub-list for method output_type + 0, // [0:5] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_init() } @@ -891,14 +789,13 @@ func file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_rawDesc, - NumEnums: 1, + NumEnums: 0, NumMessages: 10, NumExtensions: 0, NumServices: 1, }, GoTypes: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_goTypes, DependencyIndexes: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_depIdxs, - EnumInfos: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_enumTypes, MessageInfos: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_msgTypes, }.Build() File_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto = out.File diff --git a/client/api/filesystem/v1beta2/api.proto b/client/api/filesystem/v1beta2/api.proto index 938182e1..fdaf391b 100644 --- a/client/api/filesystem/v1beta2/api.proto +++ b/client/api/filesystem/v1beta2/api.proto @@ -24,27 +24,9 @@ service Filesystem { rpc IsSymlink(IsSymlinkRequest) returns (IsSymlinkResponse) {} } -// Context of the paths used for path prefix validation -enum PathContext { - // Indicates the kubelet-csi-plugins-path parameter of csi-proxy be used as - // the path context. This may be used while handling NodeStageVolume where - // a volume may need to be mounted at a plugin-specific path like: - // kubelet\plugins\kubernetes.io\csi\pv\\globalmount - PLUGIN = 0; - // Indicates the kubelet-pod-path parameter of csi-proxy be used as the path - // context. This may be used while handling NodePublishVolume where a staged - // volume may be need to be symlinked to a pod-specific path like: - // kubelet\pods\\volumes\kubernetes.io~csi\\mount - POD = 1; -} - message PathExistsRequest { // The path whose existence we want to check in the host's filesystem string path = 1; - - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - PathContext context = 2; } message PathExistsResponse { @@ -72,10 +54,6 @@ message MkdirRequest { // Characters: .. / : | ? * in the path are not allowed. // Maximum path length will be capped to 260 characters. string path = 1; - - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - PathContext context = 2; } message MkdirResponse { @@ -100,12 +78,8 @@ message RmdirRequest { // Maximum path length will be capped to 260 characters. string path = 1; - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - PathContext context = 2; - // Force remove all contents under path (if any). - bool force = 3; + bool force = 2; } message RmdirResponse { diff --git a/cmd/csi-proxy/main.go b/cmd/csi-proxy/main.go index dddde9f8..0da9f728 100644 --- a/cmd/csi-proxy/main.go +++ b/cmd/csi-proxy/main.go @@ -23,10 +23,9 @@ import ( ) var ( - kubeletCSIPluginsPath = flag.String("kubelet-csi-plugins-path", `C:\var\lib\kubelet`, "Prefix path of the Kubelet plugin directory in the host file system") - kubeletPodPath = flag.String("kubelet-pod-path", `C:\var\lib\kubelet`, "Prefix path of the kubelet pod directory in the host file system") - windowsSvc = flag.Bool("windows-service", false, "Configure as a Windows Service") - service *handler + kubeletPath = flag.String("kubelet-path", `C:\var\lib\kubelet`, "Prefix path of the kubelet directory in the host file system") + windowsSvc = flag.Bool("windows-service", false, "Configure as a Windows Service") + service *handler ) type handler struct { @@ -61,7 +60,7 @@ func main() { // apiGroups returns the list of enabled API groups. func apiGroups() ([]srvtypes.APIGroup, error) { - fssrv, err := filesystemsrv.NewServer(*kubeletCSIPluginsPath, *kubeletPodPath, filesystemapi.New()) + fssrv, err := filesystemsrv.NewServer(*kubeletPath, filesystemapi.New()) if err != nil { return []srvtypes.APIGroup{}, err } diff --git a/integrationtests/filesystem_v1alpha1_test.go b/integrationtests/filesystem_v1alpha1_test.go index 06731036..3acdb2f5 100644 --- a/integrationtests/filesystem_v1alpha1_test.go +++ b/integrationtests/filesystem_v1alpha1_test.go @@ -26,7 +26,7 @@ func v1alpha1FilesystemTests(t *testing.T) { r1 := rand.New(s1) // simulate FS operations around staging a volume on a node - stagepath := getWorkDirPath(fmt.Sprintf("testplugin-%d.csi.io\\volume%d", r1.Intn(100), r1.Intn(100)), t) + stagepath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d", r1.Intn(100), r1.Intn(100)), t) mkdirReq := &v1alpha1.MkdirRequest{ Path: stagepath, Context: v1alpha1.PathContext_PLUGIN, @@ -38,7 +38,7 @@ func v1alpha1FilesystemTests(t *testing.T) { assert.True(t, exists, err) // simulate operations around publishing a volume to a pod - podpath := getWorkDirPath(fmt.Sprintf("test-pod-id\\volumes\\kubernetes.io~csi\\pvc-test%d", r1.Intn(100)), t) + podpath := getKubeletPathForTest(fmt.Sprintf("test-pod-id\\volumes\\kubernetes.io~csi\\pvc-test%d", r1.Intn(100)), t) mkdirReq = &v1alpha1.MkdirRequest{ Path: podpath, Context: v1alpha1.PathContext_POD, @@ -96,13 +96,13 @@ func v1alpha1FilesystemTests(t *testing.T) { rand1 := r1.Intn(100) rand2 := r1.Intn(100) - testDir := getWorkDirPath(fmt.Sprintf("testplugin-%d.csi.io", rand1), t) + testDir := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io", rand1), t) err = os.MkdirAll(testDir, os.ModeDir) require.Nil(t, err) defer os.RemoveAll(testDir) // 1. Check the isMount on a path which does not exist. Failure scenario. - stagepath := getWorkDirPath(fmt.Sprintf("testplugin-%d.csi.io\\volume%d", rand1, rand2), t) + stagepath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d", rand1, rand2), t) isMountRequest := &v1alpha1.IsMountPointRequest{ Path: stagepath, } @@ -122,8 +122,8 @@ func v1alpha1FilesystemTests(t *testing.T) { err = os.Remove(stagepath) require.Nil(t, err) - targetStagePath := getWorkDirPath(fmt.Sprintf("testplugin-%d.csi.io\\volume%d-tgt", rand1, rand2), t) - lnTargetStagePath := getWorkDirPath(fmt.Sprintf("testplugin-%d.csi.io\\volume%d-tgt-ln", rand1, rand2), t) + targetStagePath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d-tgt", rand1, rand2), t) + lnTargetStagePath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d-tgt-ln", rand1, rand2), t) // 3. Create soft link to the directory and make sure target exists. Success scenario. err = os.Mkdir(targetStagePath, os.ModeDir) diff --git a/integrationtests/filesystem_v1beta1_test.go b/integrationtests/filesystem_v1beta1_test.go index 118bf6d6..a2878e6d 100644 --- a/integrationtests/filesystem_v1beta1_test.go +++ b/integrationtests/filesystem_v1beta1_test.go @@ -26,7 +26,7 @@ func v1beta1FilesystemTests(t *testing.T) { r1 := rand.New(s1) // simulate FS operations around staging a volume on a node - stagepath := getWorkDirPath(fmt.Sprintf("testplugin-%d.csi.io\\volume%d", r1.Intn(100), r1.Intn(100)), t) + stagepath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d", r1.Intn(100), r1.Intn(100)), t) mkdirReq := &v1beta1.MkdirRequest{ Path: stagepath, Context: v1beta1.PathContext_PLUGIN, @@ -38,7 +38,7 @@ func v1beta1FilesystemTests(t *testing.T) { assert.True(t, exists, err) // simulate operations around publishing a volume to a pod - podpath := getWorkDirPath(fmt.Sprintf("test-pod-id\\volumes\\kubernetes.io~csi\\pvc-test%d", r1.Intn(100)), t) + podpath := getKubeletPathForTest(fmt.Sprintf("test-pod-id\\volumes\\kubernetes.io~csi\\pvc-test%d", r1.Intn(100)), t) mkdirReq = &v1beta1.MkdirRequest{ Path: podpath, Context: v1beta1.PathContext_POD, @@ -96,13 +96,13 @@ func v1beta1FilesystemTests(t *testing.T) { rand1 := r1.Intn(100) rand2 := r1.Intn(100) - testDir := getWorkDirPath(fmt.Sprintf("testplugin-%d.csi.io", rand1), t) + testDir := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io", rand1), t) err = os.MkdirAll(testDir, os.ModeDir) require.Nil(t, err) defer os.RemoveAll(testDir) // 1. Check the isMount on a path which does not exist. Failure scenario. - stagepath := getWorkDirPath(fmt.Sprintf("testplugin-%d.csi.io\\volume%d", rand1, rand2), t) + stagepath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d", rand1, rand2), t) isMountRequest := &v1beta1.IsMountPointRequest{ Path: stagepath, } @@ -122,8 +122,8 @@ func v1beta1FilesystemTests(t *testing.T) { err = os.Remove(stagepath) require.Nil(t, err) - targetStagePath := getWorkDirPath(fmt.Sprintf("testplugin-%d.csi.io\\volume%d-tgt", rand1, rand2), t) - lnTargetStagePath := getWorkDirPath(fmt.Sprintf("testplugin-%d.csi.io\\volume%d-tgt-ln", rand1, rand2), t) + targetStagePath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d-tgt", rand1, rand2), t) + lnTargetStagePath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d-tgt-ln", rand1, rand2), t) // 3. Create soft link to the directory and make sure target exists. Success scenario. err = os.Mkdir(targetStagePath, os.ModeDir) diff --git a/integrationtests/filesystem_v1beta2_test.go b/integrationtests/filesystem_v1beta2_test.go index 566d6214..4d165d37 100644 --- a/integrationtests/filesystem_v1beta2_test.go +++ b/integrationtests/filesystem_v1beta2_test.go @@ -26,10 +26,9 @@ func v1beta2FilesystemTests(t *testing.T) { r1 := rand.New(s1) // simulate FS operations around staging a volume on a node - stagepath := getWorkDirPath(fmt.Sprintf("testplugin-%d.csi.io\\volume%d", r1.Intn(100), r1.Intn(100)), t) + stagepath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d", r1.Intn(100), r1.Intn(100)), t) mkdirReq := &v1beta2.MkdirRequest{ - Path: stagepath, - Context: v1beta2.PathContext_PLUGIN, + Path: stagepath, } _, err = client.Mkdir(context.Background(), mkdirReq) require.NoError(t, err) @@ -38,10 +37,9 @@ func v1beta2FilesystemTests(t *testing.T) { assert.True(t, exists, err) // simulate operations around publishing a volume to a pod - podpath := getWorkDirPath(fmt.Sprintf("test-pod-id\\volumes\\kubernetes.io~csi\\pvc-test%d", r1.Intn(100)), t) + podpath := getKubeletPathForTest(fmt.Sprintf("test-pod-id\\volumes\\kubernetes.io~csi\\pvc-test%d", r1.Intn(100)), t) mkdirReq = &v1beta2.MkdirRequest{ - Path: podpath, - Context: v1beta2.PathContext_POD, + Path: podpath, } _, err = client.Mkdir(context.Background(), mkdirReq) require.NoError(t, err) @@ -64,9 +62,8 @@ func v1beta2FilesystemTests(t *testing.T) { // cleanup pvpath rmdirReq := &v1beta2.RmdirRequest{ - Path: podpath, - Context: v1beta2.PathContext_POD, - Force: true, + Path: podpath, + Force: true, } _, err = client.Rmdir(context.Background(), rmdirReq) require.NoError(t, err) @@ -76,9 +73,8 @@ func v1beta2FilesystemTests(t *testing.T) { // cleanup plugin path rmdirReq = &v1beta2.RmdirRequest{ - Path: stagepath, - Context: v1beta2.PathContext_PLUGIN, - Force: true, + Path: stagepath, + Force: true, } _, err = client.Rmdir(context.Background(), rmdirReq) require.NoError(t, err) @@ -96,13 +92,13 @@ func v1beta2FilesystemTests(t *testing.T) { rand1 := r1.Intn(100) rand2 := r1.Intn(100) - testDir := getWorkDirPath(fmt.Sprintf("testplugin-%d.csi.io", rand1), t) + testDir := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io", rand1), t) err = os.MkdirAll(testDir, os.ModeDir) require.Nil(t, err) defer os.RemoveAll(testDir) // 1. Check the isMount on a path which does not exist. Failure scenario. - stagepath := getWorkDirPath(fmt.Sprintf("testplugin-%d.csi.io\\volume%d", rand1, rand2), t) + stagepath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d", rand1, rand2), t) IsSymlinkRequest := &v1beta2.IsSymlinkRequest{ Path: stagepath, } @@ -122,8 +118,8 @@ func v1beta2FilesystemTests(t *testing.T) { err = os.Remove(stagepath) require.Nil(t, err) - targetStagePath := getWorkDirPath(fmt.Sprintf("testplugin-%d.csi.io\\volume%d-tgt", rand1, rand2), t) - lnTargetStagePath := getWorkDirPath(fmt.Sprintf("testplugin-%d.csi.io\\volume%d-tgt-ln", rand1, rand2), t) + targetStagePath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d-tgt", rand1, rand2), t) + lnTargetStagePath := getKubeletPathForTest(fmt.Sprintf("testplugin-%d.csi.io\\volume%d-tgt-ln", rand1, rand2), t) // 3. Create soft link to the directory and make sure target exists. Success scenario. err = os.Mkdir(targetStagePath, os.ModeDir) diff --git a/integrationtests/utils.go b/integrationtests/utils.go index c4593756..4d41bb9e 100644 --- a/integrationtests/utils.go +++ b/integrationtests/utils.go @@ -125,14 +125,10 @@ func readFile(t *testing.T, filePath string) string { return string(contents) } -// GetWorkDirPath returns the path to the current working directory +// getKubeletPathForTest returns the path to the current working directory // to be used anytime the filepath is required to be within context of csi-proxy -func getWorkDirPath(dir string, t *testing.T) string { - path, err := os.Getwd() - if err != nil { - t.Fatalf("failed to get working directory: %s", err) - } - return filepath.Join(path, "testdir", dir) +func getKubeletPathForTest(dir string, t *testing.T) string { + return filepath.Join("C:\\var\\lib\\kubelet", "testdir", dir) } // returns true if CSI_PROXY_GH_ACTIONS is set to "TRUE" diff --git a/internal/server/filesystem/internal/types.go b/internal/server/filesystem/internal/types.go index 2a74b5f0..475220e9 100644 --- a/internal/server/filesystem/internal/types.go +++ b/internal/server/filesystem/internal/types.go @@ -1,21 +1,9 @@ package internal -type PathContext int32 - -const ( - // Indicates the kubelet-csi-plugins-path parameter of csi-proxy be used as the path context - PLUGIN PathContext = iota - // Indicates the kubelet-pod-path parameter of csi-proxy be used as the path context - POD -) - // PathExistsRequest is the internal representation of requests to the PathExists endpoint. type PathExistsRequest struct { // The path whose existence we want to check in the host's filesystem Path string - // Context of the path parameter. - // This is used to determine the root for relative path parameters - Context PathContext } // PathExistsResponse is the internal representation of responses from the PathExists endpoint. @@ -44,11 +32,6 @@ type MkdirRequest struct { // Characters: .. / : | ? * in the path are not allowed. // Maximum path length will be capped to 260 characters. Path string - // Context of the path parameter. - // This is used to [1] determine the root for relative path parameters - // or [2] validate prefix for absolute paths (indicated by a drive letter - // prefix: e.g. "C:\") - Context PathContext } type MkdirResponse struct { @@ -71,11 +54,6 @@ type RmdirRequest struct { // Path cannot be a file of type symlink. // Maximum path length will be capped to 260 characters. Path string - // Context of the path creation used for path prefix validation - // This is used to [1] determine the root for relative path parameters - // or [2] validate prefix for absolute paths (indicated by a drive letter - // prefix: e.g. "C:\") - Context PathContext // Force remove all contents under path (if any). Force bool } diff --git a/internal/server/filesystem/internal/v1alpha1/conversion_generated.go b/internal/server/filesystem/internal/v1alpha1/conversion_generated.go index 6512b238..19833d1c 100644 --- a/internal/server/filesystem/internal/v1alpha1/conversion_generated.go +++ b/internal/server/filesystem/internal/v1alpha1/conversion_generated.go @@ -89,7 +89,6 @@ func Convert_internal_LinkPathResponse_To_v1alpha1_LinkPathResponse(in *internal func autoConvert_v1alpha1_MkdirRequest_To_internal_MkdirRequest(in *v1alpha1.MkdirRequest, out *internal.MkdirRequest) error { out.Path = in.Path - out.Context = internal.PathContext(in.Context) return nil } @@ -100,7 +99,6 @@ func Convert_v1alpha1_MkdirRequest_To_internal_MkdirRequest(in *v1alpha1.MkdirRe func autoConvert_internal_MkdirRequest_To_v1alpha1_MkdirRequest(in *internal.MkdirRequest, out *v1alpha1.MkdirRequest) error { out.Path = in.Path - out.Context = v1alpha1.PathContext(in.Context) return nil } @@ -129,7 +127,6 @@ func Convert_internal_MkdirResponse_To_v1alpha1_MkdirResponse(in *internal.Mkdir func autoConvert_v1alpha1_PathExistsRequest_To_internal_PathExistsRequest(in *v1alpha1.PathExistsRequest, out *internal.PathExistsRequest) error { out.Path = in.Path - out.Context = internal.PathContext(in.Context) return nil } @@ -140,7 +137,6 @@ func Convert_v1alpha1_PathExistsRequest_To_internal_PathExistsRequest(in *v1alph func autoConvert_internal_PathExistsRequest_To_v1alpha1_PathExistsRequest(in *internal.PathExistsRequest, out *v1alpha1.PathExistsRequest) error { out.Path = in.Path - out.Context = v1alpha1.PathContext(in.Context) return nil } @@ -171,7 +167,6 @@ func Convert_internal_PathExistsResponse_To_v1alpha1_PathExistsResponse(in *inte func autoConvert_v1alpha1_RmdirRequest_To_internal_RmdirRequest(in *v1alpha1.RmdirRequest, out *internal.RmdirRequest) error { out.Path = in.Path - out.Context = internal.PathContext(in.Context) out.Force = in.Force return nil } @@ -183,7 +178,6 @@ func Convert_v1alpha1_RmdirRequest_To_internal_RmdirRequest(in *v1alpha1.RmdirRe func autoConvert_internal_RmdirRequest_To_v1alpha1_RmdirRequest(in *internal.RmdirRequest, out *v1alpha1.RmdirRequest) error { out.Path = in.Path - out.Context = v1alpha1.PathContext(in.Context) out.Force = in.Force return nil } diff --git a/internal/server/filesystem/internal/v1beta1/conversion_generated.go b/internal/server/filesystem/internal/v1beta1/conversion_generated.go index b6a81ecf..9d42e91d 100644 --- a/internal/server/filesystem/internal/v1beta1/conversion_generated.go +++ b/internal/server/filesystem/internal/v1beta1/conversion_generated.go @@ -89,7 +89,6 @@ func Convert_internal_LinkPathResponse_To_v1beta1_LinkPathResponse(in *internal. func autoConvert_v1beta1_MkdirRequest_To_internal_MkdirRequest(in *v1beta1.MkdirRequest, out *internal.MkdirRequest) error { out.Path = in.Path - out.Context = internal.PathContext(in.Context) return nil } @@ -100,7 +99,6 @@ func Convert_v1beta1_MkdirRequest_To_internal_MkdirRequest(in *v1beta1.MkdirRequ func autoConvert_internal_MkdirRequest_To_v1beta1_MkdirRequest(in *internal.MkdirRequest, out *v1beta1.MkdirRequest) error { out.Path = in.Path - out.Context = v1beta1.PathContext(in.Context) return nil } @@ -129,7 +127,6 @@ func Convert_internal_MkdirResponse_To_v1beta1_MkdirResponse(in *internal.MkdirR func autoConvert_v1beta1_PathExistsRequest_To_internal_PathExistsRequest(in *v1beta1.PathExistsRequest, out *internal.PathExistsRequest) error { out.Path = in.Path - out.Context = internal.PathContext(in.Context) return nil } @@ -140,7 +137,6 @@ func Convert_v1beta1_PathExistsRequest_To_internal_PathExistsRequest(in *v1beta1 func autoConvert_internal_PathExistsRequest_To_v1beta1_PathExistsRequest(in *internal.PathExistsRequest, out *v1beta1.PathExistsRequest) error { out.Path = in.Path - out.Context = v1beta1.PathContext(in.Context) return nil } @@ -171,7 +167,6 @@ func Convert_internal_PathExistsResponse_To_v1beta1_PathExistsResponse(in *inter func autoConvert_v1beta1_RmdirRequest_To_internal_RmdirRequest(in *v1beta1.RmdirRequest, out *internal.RmdirRequest) error { out.Path = in.Path - out.Context = internal.PathContext(in.Context) out.Force = in.Force return nil } @@ -183,7 +178,6 @@ func Convert_v1beta1_RmdirRequest_To_internal_RmdirRequest(in *v1beta1.RmdirRequ func autoConvert_internal_RmdirRequest_To_v1beta1_RmdirRequest(in *internal.RmdirRequest, out *v1beta1.RmdirRequest) error { out.Path = in.Path - out.Context = v1beta1.PathContext(in.Context) out.Force = in.Force return nil } diff --git a/internal/server/filesystem/internal/v1beta2/conversion_generated.go b/internal/server/filesystem/internal/v1beta2/conversion_generated.go index b2e36818..874cc6ea 100644 --- a/internal/server/filesystem/internal/v1beta2/conversion_generated.go +++ b/internal/server/filesystem/internal/v1beta2/conversion_generated.go @@ -89,7 +89,6 @@ func Convert_internal_IsSymlinkResponse_To_v1beta2_IsSymlinkResponse(in *interna func autoConvert_v1beta2_MkdirRequest_To_internal_MkdirRequest(in *v1beta2.MkdirRequest, out *internal.MkdirRequest) error { out.Path = in.Path - out.Context = internal.PathContext(in.Context) return nil } @@ -100,7 +99,6 @@ func Convert_v1beta2_MkdirRequest_To_internal_MkdirRequest(in *v1beta2.MkdirRequ func autoConvert_internal_MkdirRequest_To_v1beta2_MkdirRequest(in *internal.MkdirRequest, out *v1beta2.MkdirRequest) error { out.Path = in.Path - out.Context = v1beta2.PathContext(in.Context) return nil } @@ -129,7 +127,6 @@ func Convert_internal_MkdirResponse_To_v1beta2_MkdirResponse(in *internal.MkdirR func autoConvert_v1beta2_PathExistsRequest_To_internal_PathExistsRequest(in *v1beta2.PathExistsRequest, out *internal.PathExistsRequest) error { out.Path = in.Path - out.Context = internal.PathContext(in.Context) return nil } @@ -140,7 +137,6 @@ func Convert_v1beta2_PathExistsRequest_To_internal_PathExistsRequest(in *v1beta2 func autoConvert_internal_PathExistsRequest_To_v1beta2_PathExistsRequest(in *internal.PathExistsRequest, out *v1beta2.PathExistsRequest) error { out.Path = in.Path - out.Context = v1beta2.PathContext(in.Context) return nil } @@ -171,7 +167,6 @@ func Convert_internal_PathExistsResponse_To_v1beta2_PathExistsResponse(in *inter func autoConvert_v1beta2_RmdirRequest_To_internal_RmdirRequest(in *v1beta2.RmdirRequest, out *internal.RmdirRequest) error { out.Path = in.Path - out.Context = internal.PathContext(in.Context) out.Force = in.Force return nil } @@ -183,7 +178,6 @@ func Convert_v1beta2_RmdirRequest_To_internal_RmdirRequest(in *v1beta2.RmdirRequ func autoConvert_internal_RmdirRequest_To_v1beta2_RmdirRequest(in *internal.RmdirRequest, out *v1beta2.RmdirRequest) error { out.Path = in.Path - out.Context = v1beta2.PathContext(in.Context) out.Force = in.Force return nil } diff --git a/internal/server/filesystem/server.go b/internal/server/filesystem/server.go index b9ee115b..00a8ff52 100644 --- a/internal/server/filesystem/server.go +++ b/internal/server/filesystem/server.go @@ -14,9 +14,8 @@ import ( ) type Server struct { - kubeletCSIPluginsPath string - kubeletPodPath string - hostAPI filesystem.API + kubeletPath string + hostAPI filesystem.API } // check that Server fulfills internal.ServerInterface @@ -25,11 +24,10 @@ var _ internal.ServerInterface = &Server{} var invalidPathCharsRegexWindows = regexp.MustCompile(`["/\:\?\*|]`) var absPathRegexWindows = regexp.MustCompile(`^[a-zA-Z]:\\`) -func NewServer(kubeletCSIPluginsPath string, kubeletPodPath string, hostAPI filesystem.API) (*Server, error) { +func NewServer(kubeletPath string, hostAPI filesystem.API) (*Server, error) { return &Server{ - kubeletCSIPluginsPath: kubeletCSIPluginsPath, - kubeletPodPath: kubeletPodPath, - hostAPI: hostAPI, + kubeletPath: kubeletPath, + hostAPI: hostAPI, }, nil } @@ -64,24 +62,14 @@ func isAbsWindows(path string) bool { return absPathRegexWindows.MatchString(path) } -// ValidatePluginPath - Validates the path is compatible with the 'plugin path' +// ValidatePluginPath - Validates the path is compatible with the 'kubelet path' // restrictions. -// Note: The reason why we cannot reuse the validatePathWindows directly -// from other parts of the library is that it seems internal.PLUGIN was not -// usable from outside the internal path tree. func (s *Server) ValidatePluginPath(path string) error { - return s.validatePathWindows(internal.PLUGIN, path) + return s.validatePathWindows(path) } -func (s *Server) validatePathWindows(pathCtx internal.PathContext, path string) error { - prefix := "" - if pathCtx == internal.PLUGIN { - prefix = s.kubeletCSIPluginsPath - } else if pathCtx == internal.POD { - prefix = s.kubeletPodPath - } else { - return fmt.Errorf("invalid PathContext: %v", pathCtx) - } +func (s *Server) validatePathWindows(path string) error { + prefix := s.kubeletPath pathlen := len(path) @@ -115,7 +103,7 @@ func (s *Server) validatePathWindows(pathCtx internal.PathContext, path string) // PathExists checks if the given path exists on the host. func (s *Server) PathExists(ctx context.Context, request *internal.PathExistsRequest, version apiversion.Version) (*internal.PathExistsResponse, error) { klog.V(2).Infof("Request: PathExists with path=%q", request.Path) - err := s.validatePathWindows(request.Context, request.Path) + err := s.validatePathWindows(request.Path) if err != nil { klog.Errorf("failed validatePathWindows %v", err) return nil, err @@ -138,7 +126,7 @@ func (s *Server) PathValid(ctx context.Context, path string) (bool, error) { func (s *Server) Mkdir(ctx context.Context, request *internal.MkdirRequest, version apiversion.Version) (*internal.MkdirResponse, error) { klog.V(2).Infof("Request: Mkdir with path=%q", request.Path) - err := s.validatePathWindows(request.Context, request.Path) + err := s.validatePathWindows(request.Path) if err != nil { klog.Errorf("failed validatePathWindows %v", err) return nil, err @@ -154,7 +142,7 @@ func (s *Server) Mkdir(ctx context.Context, request *internal.MkdirRequest, vers func (s *Server) Rmdir(ctx context.Context, request *internal.RmdirRequest, version apiversion.Version) (*internal.RmdirResponse, error) { klog.V(2).Infof("Request: Rmdir with path=%q", request.Path) - err := s.validatePathWindows(request.Context, request.Path) + err := s.validatePathWindows(request.Path) if err != nil { klog.Errorf("failed validatePathWindows %v", err) return nil, err @@ -181,12 +169,12 @@ func (s *Server) LinkPath(ctx context.Context, request *internal.LinkPathRequest func (s *Server) CreateSymlink(ctx context.Context, request *internal.CreateSymlinkRequest, version apiversion.Version) (*internal.CreateSymlinkResponse, error) { klog.V(2).Infof("Request: CreateSymlink with targetPath=%q sourcePath=%q", request.TargetPath, request.SourcePath) - err := s.validatePathWindows(internal.POD, request.TargetPath) + err := s.validatePathWindows(request.TargetPath) if err != nil { klog.Errorf("failed validatePathWindows for target path %v", err) return nil, err } - err = s.validatePathWindows(internal.PLUGIN, request.SourcePath) + err = s.validatePathWindows(request.SourcePath) if err != nil { klog.Errorf("failed validatePathWindows for source path %v", err) return nil, err diff --git a/internal/server/filesystem/server_test.go b/internal/server/filesystem/server_test.go index 815cb011..f19640d5 100644 --- a/internal/server/filesystem/server_test.go +++ b/internal/server/filesystem/server_test.go @@ -41,104 +41,90 @@ func TestMkdirWindows(t *testing.T) { testCases := []struct { name string path string - pathCtx internal.PathContext version apiversion.Version expectError bool }{ { name: "path outside of pod context with pod context set", path: `C:\foo\bar`, - pathCtx: internal.POD, version: v1, expectError: true, }, { name: "path inside pod context with pod context set", path: `C:\var\lib\kubelet\pods\pv1`, - pathCtx: internal.POD, version: v1, expectError: false, }, { name: "path outside of plugin context with plugin context set", path: `C:\foo\bar`, - pathCtx: internal.PLUGIN, version: v1, expectError: true, }, { name: "path inside plugin context with plugin context set", path: `C:\var\lib\kubelet\plugins\pv1`, - pathCtx: internal.PLUGIN, version: v1, expectError: false, }, { name: "path with invalid character `:` beyond drive letter prefix", path: `C:\var\lib\kubelet\plugins\csi-plugin\pv1:foo`, - pathCtx: internal.PLUGIN, version: v1, expectError: true, }, { name: "path with invalid character `/`", path: `C:\var\lib\kubelet\pods\pv1/foo`, - pathCtx: internal.POD, version: v1, expectError: true, }, { name: "path with invalid character `*`", path: `C:\var\lib\kubelet\plugins\csi-plugin\pv1*foo`, - pathCtx: internal.PLUGIN, version: v1, expectError: true, }, { name: "path with invalid character `?`", path: `C:\var\lib\kubelet\pods\pv1?foo`, - pathCtx: internal.POD, version: v1, expectError: true, }, { name: "path with invalid character `|`", path: `C:\var\lib\kubelet\plugins\csi-plugin|pv1\foo`, - pathCtx: internal.PLUGIN, version: v1, expectError: true, }, { name: "path with invalid characters `..`", path: `C:\var\lib\kubelet\pods\pv1\..\..\..\system32`, - pathCtx: internal.POD, version: v1, expectError: true, }, { name: "path with invalid prefix `\\`", path: `\\csi-plugin\..\..\..\system32`, - pathCtx: internal.POD, version: v1, expectError: true, }, { name: "relative path", path: `pv1\foo`, - pathCtx: internal.POD, version: v1, expectError: true, }, } - srv, err := NewServer(`C:\var\lib\kubelet\plugins`, `C:\var\lib\kubelet\pods`, &fakeFileSystemAPI{}) + srv, err := NewServer(`C:\var\lib\kubelet`, &fakeFileSystemAPI{}) if err != nil { t.Fatalf("FileSystem Server could not be initialized for testing: %v", err) } for _, tc := range testCases { t.Logf("test case: %s", tc.name) req := &internal.MkdirRequest{ - Path: tc.path, - Context: tc.pathCtx, + Path: tc.path, } _, err := srv.Mkdir(context.TODO(), req, tc.version) if tc.expectError && err == nil { @@ -158,7 +144,6 @@ func TestRmdirWindows(t *testing.T) { testCases := []struct { name string path string - pathCtx internal.PathContext version apiversion.Version expectError bool force bool @@ -166,98 +151,85 @@ func TestRmdirWindows(t *testing.T) { { name: "path outside of pod context with pod context set", path: `C:\foo\bar`, - pathCtx: internal.POD, version: v1, expectError: true, }, { name: "path inside pod context with pod context set", path: `C:\var\lib\kubelet\pods\pv1`, - pathCtx: internal.POD, version: v1, expectError: false, }, { name: "path outside of plugin context with plugin context set", path: `C:\foo\bar`, - pathCtx: internal.PLUGIN, version: v1, expectError: true, }, { name: "path inside plugin context with plugin context set", path: `C:\var\lib\kubelet\plugins\pv1`, - pathCtx: internal.PLUGIN, version: v1, expectError: false, }, { name: "path with invalid character `:` beyond drive letter prefix", path: `C:\var\lib\kubelet\plugins\csi-plugin\pv1:foo`, - pathCtx: internal.PLUGIN, version: v1, expectError: true, }, { name: "path with invalid character `/`", path: `C:\var\lib\kubelet\pods\pv1/foo`, - pathCtx: internal.POD, version: v1, expectError: true, }, { name: "path with invalid character `*`", path: `C:\var\lib\kubelet\plugins\csi-plugin\pv1*foo`, - pathCtx: internal.PLUGIN, version: v1, expectError: true, }, { name: "path with invalid character `?`", path: `C:\var\lib\kubelet\pods\pv1?foo`, - pathCtx: internal.POD, version: v1, expectError: true, }, { name: "path with invalid character `|`", path: `C:\var\lib\kubelet\plugins\csi-plugin|pv1\foo`, - pathCtx: internal.PLUGIN, version: v1, expectError: true, }, { name: "path with invalid characters `..`", path: `C:\var\lib\kubelet\pods\pv1\..\..\..\system32`, - pathCtx: internal.POD, version: v1, expectError: true, }, { name: "path with invalid prefix `\\`", path: `\\csi-plugin\..\..\..\system32`, - pathCtx: internal.POD, version: v1, expectError: true, }, { name: "relative path", path: `pv1\foo`, - pathCtx: internal.POD, version: v1, expectError: true, }, } - srv, err := NewServer(`C:\var\lib\kubelet\plugins`, `C:\var\lib\kubelet\pods`, &fakeFileSystemAPI{}) + srv, err := NewServer(`C:\var\lib\kubelet`, &fakeFileSystemAPI{}) if err != nil { t.Fatalf("FileSystem Server could not be initialized for testing: %v", err) } for _, tc := range testCases { t.Logf("test case: %s", tc.name) req := &internal.RmdirRequest{ - Path: tc.path, - Context: tc.pathCtx, - Force: tc.force, + Path: tc.path, + Force: tc.force, } _, err := srv.Rmdir(context.TODO(), req, tc.version) if tc.expectError && err == nil { diff --git a/internal/server/smb/server_test.go b/internal/server/smb/server_test.go index 9cc7f8cb..d3997766 100644 --- a/internal/server/smb/server_test.go +++ b/internal/server/smb/server_test.go @@ -83,7 +83,7 @@ func TestNewSmbGlobalMapping(t *testing.T) { expectError: false, }, } - fsSrv, err := fsserver.NewServer(`C:\var\lib\kubelet\plugins`, `C:\var\lib\kubelet\pods`, &fakeFileSystemAPI{}) + fsSrv, err := fsserver.NewServer(`C:\var\lib\kubelet`, &fakeFileSystemAPI{}) if err != nil { t.Fatalf("FileSystem Server could not be initialized for testing: %v", err) } diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta2/api.pb.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta2/api.pb.go index 0219d023..c54cd7b8 100644 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta2/api.pb.go +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta2/api.pb.go @@ -24,61 +24,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Context of the paths used for path prefix validation -type PathContext int32 - -const ( - // Indicates the kubelet-csi-plugins-path parameter of csi-proxy be used as - // the path context. This may be used while handling NodeStageVolume where - // a volume may need to be mounted at a plugin-specific path like: - // kubelet\plugins\kubernetes.io\csi\pv\\globalmount - PathContext_PLUGIN PathContext = 0 - // Indicates the kubelet-pod-path parameter of csi-proxy be used as the path - // context. This may be used while handling NodePublishVolume where a staged - // volume may be need to be symlinked to a pod-specific path like: - // kubelet\pods\\volumes\kubernetes.io~csi\\mount - PathContext_POD PathContext = 1 -) - -// Enum value maps for PathContext. -var ( - PathContext_name = map[int32]string{ - 0: "PLUGIN", - 1: "POD", - } - PathContext_value = map[string]int32{ - "PLUGIN": 0, - "POD": 1, - } -) - -func (x PathContext) Enum() *PathContext { - p := new(PathContext) - *p = x - return p -} - -func (x PathContext) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PathContext) Descriptor() protoreflect.EnumDescriptor { - return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_enumTypes[0].Descriptor() -} - -func (PathContext) Type() protoreflect.EnumType { - return &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_enumTypes[0] -} - -func (x PathContext) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PathContext.Descriptor instead. -func (PathContext) EnumDescriptor() ([]byte, []int) { - return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_rawDescGZIP(), []int{0} -} - type PathExistsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -86,9 +31,6 @@ type PathExistsRequest struct { // The path whose existence we want to check in the host's filesystem Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - Context PathContext `protobuf:"varint,2,opt,name=context,proto3,enum=v1beta2.PathContext" json:"context,omitempty"` } func (x *PathExistsRequest) Reset() { @@ -130,13 +72,6 @@ func (x *PathExistsRequest) GetPath() string { return "" } -func (x *PathExistsRequest) GetContext() PathContext { - if x != nil { - return x.Context - } - return PathContext_PLUGIN -} - type PathExistsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -209,9 +144,6 @@ type MkdirRequest struct { // Characters: .. / : | ? * in the path are not allowed. // Maximum path length will be capped to 260 characters. Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - Context PathContext `protobuf:"varint,2,opt,name=context,proto3,enum=v1beta2.PathContext" json:"context,omitempty"` } func (x *MkdirRequest) Reset() { @@ -253,13 +185,6 @@ func (x *MkdirRequest) GetPath() string { return "" } -func (x *MkdirRequest) GetContext() PathContext { - if x != nil { - return x.Context - } - return PathContext_PLUGIN -} - type MkdirResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -319,11 +244,8 @@ type RmdirRequest struct { // Path cannot be a file of type symlink. // Maximum path length will be capped to 260 characters. Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - Context PathContext `protobuf:"varint,2,opt,name=context,proto3,enum=v1beta2.PathContext" json:"context,omitempty"` // Force remove all contents under path (if any). - Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"` + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` } func (x *RmdirRequest) Reset() { @@ -365,13 +287,6 @@ func (x *RmdirRequest) GetPath() string { return "" } -func (x *RmdirRequest) GetContext() PathContext { - if x != nil { - return x.Context - } - return PathContext_PLUGIN -} - func (x *RmdirRequest) GetForce() bool { if x != nil { return x.Force @@ -643,28 +558,19 @@ var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_p 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x22, 0x57, 0x0a, 0x11, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x22, 0x27, 0x0a, 0x11, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, - 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x14, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, + 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0x0a, 0x12, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x52, 0x0a, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x22, 0x0a, 0x0c, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x61, 0x74, - 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x22, 0x0f, 0x0a, 0x0d, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x68, 0x0a, 0x0c, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x68, 0x22, 0x0f, 0x0a, 0x0d, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x38, 0x0a, 0x0c, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x32, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x0f, 0x0a, 0x0d, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, @@ -678,37 +584,34 @@ var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_p 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x32, 0x0a, 0x11, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x2a, 0x22, 0x0a, 0x0b, - 0x50, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x50, - 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x4f, 0x44, 0x10, 0x01, - 0x32, 0xe1, 0x02, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, - 0x47, 0x0a, 0x0a, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1a, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x32, 0xe1, 0x02, 0x0a, + 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x47, 0x0a, 0x0a, 0x50, + 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x05, 0x4d, 0x6b, 0x64, 0x69, - 0x72, 0x12, 0x15, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4d, 0x6b, 0x64, 0x69, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x32, 0x2e, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x38, 0x0a, 0x05, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x12, 0x15, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x6d, 0x64, - 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x1d, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, - 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, - 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, - 0x0a, 0x09, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x19, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, - 0x2e, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, - 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x05, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x12, 0x15, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4d, + 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x38, + 0x0a, 0x05, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x12, 0x15, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x1d, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x09, 0x49, 0x73, + 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x19, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x49, 0x73, 0x53, + 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, + 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, + 0x69, 0x2d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -723,40 +626,35 @@ func file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_ return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_rawDescData } -var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_goTypes = []interface{}{ - (PathContext)(0), // 0: v1beta2.PathContext - (*PathExistsRequest)(nil), // 1: v1beta2.PathExistsRequest - (*PathExistsResponse)(nil), // 2: v1beta2.PathExistsResponse - (*MkdirRequest)(nil), // 3: v1beta2.MkdirRequest - (*MkdirResponse)(nil), // 4: v1beta2.MkdirResponse - (*RmdirRequest)(nil), // 5: v1beta2.RmdirRequest - (*RmdirResponse)(nil), // 6: v1beta2.RmdirResponse - (*CreateSymlinkRequest)(nil), // 7: v1beta2.CreateSymlinkRequest - (*CreateSymlinkResponse)(nil), // 8: v1beta2.CreateSymlinkResponse - (*IsSymlinkRequest)(nil), // 9: v1beta2.IsSymlinkRequest - (*IsSymlinkResponse)(nil), // 10: v1beta2.IsSymlinkResponse + (*PathExistsRequest)(nil), // 0: v1beta2.PathExistsRequest + (*PathExistsResponse)(nil), // 1: v1beta2.PathExistsResponse + (*MkdirRequest)(nil), // 2: v1beta2.MkdirRequest + (*MkdirResponse)(nil), // 3: v1beta2.MkdirResponse + (*RmdirRequest)(nil), // 4: v1beta2.RmdirRequest + (*RmdirResponse)(nil), // 5: v1beta2.RmdirResponse + (*CreateSymlinkRequest)(nil), // 6: v1beta2.CreateSymlinkRequest + (*CreateSymlinkResponse)(nil), // 7: v1beta2.CreateSymlinkResponse + (*IsSymlinkRequest)(nil), // 8: v1beta2.IsSymlinkRequest + (*IsSymlinkResponse)(nil), // 9: v1beta2.IsSymlinkResponse } var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_depIdxs = []int32{ - 0, // 0: v1beta2.PathExistsRequest.context:type_name -> v1beta2.PathContext - 0, // 1: v1beta2.MkdirRequest.context:type_name -> v1beta2.PathContext - 0, // 2: v1beta2.RmdirRequest.context:type_name -> v1beta2.PathContext - 1, // 3: v1beta2.Filesystem.PathExists:input_type -> v1beta2.PathExistsRequest - 3, // 4: v1beta2.Filesystem.Mkdir:input_type -> v1beta2.MkdirRequest - 5, // 5: v1beta2.Filesystem.Rmdir:input_type -> v1beta2.RmdirRequest - 7, // 6: v1beta2.Filesystem.CreateSymlink:input_type -> v1beta2.CreateSymlinkRequest - 9, // 7: v1beta2.Filesystem.IsSymlink:input_type -> v1beta2.IsSymlinkRequest - 2, // 8: v1beta2.Filesystem.PathExists:output_type -> v1beta2.PathExistsResponse - 4, // 9: v1beta2.Filesystem.Mkdir:output_type -> v1beta2.MkdirResponse - 6, // 10: v1beta2.Filesystem.Rmdir:output_type -> v1beta2.RmdirResponse - 8, // 11: v1beta2.Filesystem.CreateSymlink:output_type -> v1beta2.CreateSymlinkResponse - 10, // 12: v1beta2.Filesystem.IsSymlink:output_type -> v1beta2.IsSymlinkResponse - 8, // [8:13] is the sub-list for method output_type - 3, // [3:8] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 0, // 0: v1beta2.Filesystem.PathExists:input_type -> v1beta2.PathExistsRequest + 2, // 1: v1beta2.Filesystem.Mkdir:input_type -> v1beta2.MkdirRequest + 4, // 2: v1beta2.Filesystem.Rmdir:input_type -> v1beta2.RmdirRequest + 6, // 3: v1beta2.Filesystem.CreateSymlink:input_type -> v1beta2.CreateSymlinkRequest + 8, // 4: v1beta2.Filesystem.IsSymlink:input_type -> v1beta2.IsSymlinkRequest + 1, // 5: v1beta2.Filesystem.PathExists:output_type -> v1beta2.PathExistsResponse + 3, // 6: v1beta2.Filesystem.Mkdir:output_type -> v1beta2.MkdirResponse + 5, // 7: v1beta2.Filesystem.Rmdir:output_type -> v1beta2.RmdirResponse + 7, // 8: v1beta2.Filesystem.CreateSymlink:output_type -> v1beta2.CreateSymlinkResponse + 9, // 9: v1beta2.Filesystem.IsSymlink:output_type -> v1beta2.IsSymlinkResponse + 5, // [5:10] is the sub-list for method output_type + 0, // [0:5] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_init() } @@ -891,14 +789,13 @@ func file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_rawDesc, - NumEnums: 1, + NumEnums: 0, NumMessages: 10, NumExtensions: 0, NumServices: 1, }, GoTypes: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_goTypes, DependencyIndexes: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_depIdxs, - EnumInfos: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_enumTypes, MessageInfos: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto_msgTypes, }.Build() File_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1beta2_api_proto = out.File diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta2/api.proto b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta2/api.proto index 938182e1..fdaf391b 100644 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta2/api.proto +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta2/api.proto @@ -24,27 +24,9 @@ service Filesystem { rpc IsSymlink(IsSymlinkRequest) returns (IsSymlinkResponse) {} } -// Context of the paths used for path prefix validation -enum PathContext { - // Indicates the kubelet-csi-plugins-path parameter of csi-proxy be used as - // the path context. This may be used while handling NodeStageVolume where - // a volume may need to be mounted at a plugin-specific path like: - // kubelet\plugins\kubernetes.io\csi\pv\\globalmount - PLUGIN = 0; - // Indicates the kubelet-pod-path parameter of csi-proxy be used as the path - // context. This may be used while handling NodePublishVolume where a staged - // volume may be need to be symlinked to a pod-specific path like: - // kubelet\pods\\volumes\kubernetes.io~csi\\mount - POD = 1; -} - message PathExistsRequest { // The path whose existence we want to check in the host's filesystem string path = 1; - - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - PathContext context = 2; } message PathExistsResponse { @@ -72,10 +54,6 @@ message MkdirRequest { // Characters: .. / : | ? * in the path are not allowed. // Maximum path length will be capped to 260 characters. string path = 1; - - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - PathContext context = 2; } message MkdirResponse { @@ -100,12 +78,8 @@ message RmdirRequest { // Maximum path length will be capped to 260 characters. string path = 1; - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - PathContext context = 2; - // Force remove all contents under path (if any). - bool force = 3; + bool force = 2; } message RmdirResponse {