Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
9c56b533
Commit
9c56b533
authored
Nov 15, 2018
by
Masaki Kimura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the comment for csi block pathes to make look the same to filesystem
parent
6d7b5f1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
csi_block.go
pkg/volume/csi/csi_block.go
+4
-4
No files found.
pkg/volume/csi/csi_block.go
View file @
9c56b533
...
@@ -52,7 +52,7 @@ type csiBlockMapper struct {
...
@@ -52,7 +52,7 @@ type csiBlockMapper struct {
var
_
volume
.
BlockVolumeMapper
=
&
csiBlockMapper
{}
var
_
volume
.
BlockVolumeMapper
=
&
csiBlockMapper
{}
// GetGlobalMapPath returns a global map path (on the node) to a device file which will be symlinked to
// GetGlobalMapPath returns a global map path (on the node) to a device file which will be symlinked to
// Example: plugins/kubernetes.io/csi/volumeDevices/{
volumeID
}/dev
// Example: plugins/kubernetes.io/csi/volumeDevices/{
pvname
}/dev
func
(
m
*
csiBlockMapper
)
GetGlobalMapPath
(
spec
*
volume
.
Spec
)
(
string
,
error
)
{
func
(
m
*
csiBlockMapper
)
GetGlobalMapPath
(
spec
*
volume
.
Spec
)
(
string
,
error
)
{
dir
:=
getVolumeDevicePluginDir
(
spec
.
Name
(),
m
.
plugin
.
host
)
dir
:=
getVolumeDevicePluginDir
(
spec
.
Name
(),
m
.
plugin
.
host
)
klog
.
V
(
4
)
.
Infof
(
log
(
"blockMapper.GetGlobalMapPath = %s"
,
dir
))
klog
.
V
(
4
)
.
Infof
(
log
(
"blockMapper.GetGlobalMapPath = %s"
,
dir
))
...
@@ -60,21 +60,21 @@ func (m *csiBlockMapper) GetGlobalMapPath(spec *volume.Spec) (string, error) {
...
@@ -60,21 +60,21 @@ func (m *csiBlockMapper) GetGlobalMapPath(spec *volume.Spec) (string, error) {
}
}
// getStagingPath returns a staging path for a directory (on the node) that should be used on NodeStageVolume/NodeUnstageVolume
// getStagingPath returns a staging path for a directory (on the node) that should be used on NodeStageVolume/NodeUnstageVolume
// Example: plugins/kubernetes.io/csi/volumeDevices/staging/{
volumeID
}
// Example: plugins/kubernetes.io/csi/volumeDevices/staging/{
pvname
}
func
(
m
*
csiBlockMapper
)
getStagingPath
()
string
{
func
(
m
*
csiBlockMapper
)
getStagingPath
()
string
{
sanitizedSpecVolID
:=
kstrings
.
EscapeQualifiedNameForDisk
(
m
.
specName
)
sanitizedSpecVolID
:=
kstrings
.
EscapeQualifiedNameForDisk
(
m
.
specName
)
return
path
.
Join
(
m
.
plugin
.
host
.
GetVolumeDevicePluginDir
(
csiPluginName
),
"staging"
,
sanitizedSpecVolID
)
return
path
.
Join
(
m
.
plugin
.
host
.
GetVolumeDevicePluginDir
(
csiPluginName
),
"staging"
,
sanitizedSpecVolID
)
}
}
// getPublishPath returns a publish path for a file (on the node) that should be used on NodePublishVolume/NodeUnpublishVolume
// getPublishPath returns a publish path for a file (on the node) that should be used on NodePublishVolume/NodeUnpublishVolume
// Example: plugins/kubernetes.io/csi/volumeDevices/publish/{
volumeID
}
// Example: plugins/kubernetes.io/csi/volumeDevices/publish/{
pvname
}
func
(
m
*
csiBlockMapper
)
getPublishPath
()
string
{
func
(
m
*
csiBlockMapper
)
getPublishPath
()
string
{
sanitizedSpecVolID
:=
kstrings
.
EscapeQualifiedNameForDisk
(
m
.
specName
)
sanitizedSpecVolID
:=
kstrings
.
EscapeQualifiedNameForDisk
(
m
.
specName
)
return
path
.
Join
(
m
.
plugin
.
host
.
GetVolumeDevicePluginDir
(
csiPluginName
),
"publish"
,
sanitizedSpecVolID
)
return
path
.
Join
(
m
.
plugin
.
host
.
GetVolumeDevicePluginDir
(
csiPluginName
),
"publish"
,
sanitizedSpecVolID
)
}
}
// GetPodDeviceMapPath returns pod's device file which will be mapped to a volume
// GetPodDeviceMapPath returns pod's device file which will be mapped to a volume
// returns: pods/{podUid}/volumeDevices/kubernetes.io~csi, {
volumeID
}
// returns: pods/{podUid}/volumeDevices/kubernetes.io~csi, {
pvname
}
func
(
m
*
csiBlockMapper
)
GetPodDeviceMapPath
()
(
string
,
string
)
{
func
(
m
*
csiBlockMapper
)
GetPodDeviceMapPath
()
(
string
,
string
)
{
path
:=
m
.
plugin
.
host
.
GetPodVolumeDeviceDir
(
m
.
podUID
,
kstrings
.
EscapeQualifiedNameForDisk
(
csiPluginName
))
path
:=
m
.
plugin
.
host
.
GetPodVolumeDeviceDir
(
m
.
podUID
,
kstrings
.
EscapeQualifiedNameForDisk
(
csiPluginName
))
specName
:=
m
.
specName
specName
:=
m
.
specName
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment