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
3f109d6d
Commit
3f109d6d
authored
Feb 05, 2015
by
Brendan Burns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start using GCE safe format and mount for mounting disks.
This removes the need for disks to be formatted.
parent
7c5625b2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
gce_pd.go
pkg/kubelet/volume/gce_pd/gce_pd.go
+2
-1
gce_util.go
pkg/kubelet/volume/gce_pd/gce_util.go
+1
-1
No files found.
pkg/kubelet/volume/gce_pd/gce_pd.go
View file @
3f109d6d
...
@@ -25,6 +25,7 @@ import (
...
@@ -25,6 +25,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume"
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume"
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/exec"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/mount"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/mount"
"github.com/golang/glog"
"github.com/golang/glog"
)
)
...
@@ -71,7 +72,7 @@ func (plugin *gcePersistentDiskPlugin) CanSupport(spec *api.Volume) bool {
...
@@ -71,7 +72,7 @@ func (plugin *gcePersistentDiskPlugin) CanSupport(spec *api.Volume) bool {
func
(
plugin
*
gcePersistentDiskPlugin
)
NewBuilder
(
spec
*
api
.
Volume
,
podUID
types
.
UID
)
(
volume
.
Builder
,
error
)
{
func
(
plugin
*
gcePersistentDiskPlugin
)
NewBuilder
(
spec
*
api
.
Volume
,
podUID
types
.
UID
)
(
volume
.
Builder
,
error
)
{
// Inject real implementations here, test through the internal function.
// Inject real implementations here, test through the internal function.
return
plugin
.
newBuilderInternal
(
spec
,
podUID
,
&
GCEDiskUtil
{},
mount
.
New
()
)
return
plugin
.
newBuilderInternal
(
spec
,
podUID
,
&
GCEDiskUtil
{},
&
gceSafeFormatAndMount
{
mount
.
New
(),
exec
.
New
()}
)
}
}
func
(
plugin
*
gcePersistentDiskPlugin
)
newBuilderInternal
(
spec
*
api
.
Volume
,
podUID
types
.
UID
,
manager
pdManager
,
mounter
mount
.
Interface
)
(
volume
.
Builder
,
error
)
{
func
(
plugin
*
gcePersistentDiskPlugin
)
newBuilderInternal
(
spec
*
api
.
Volume
,
podUID
types
.
UID
,
manager
pdManager
,
mounter
mount
.
Interface
)
(
volume
.
Builder
,
error
)
{
...
...
pkg/kubelet/volume/gce_pd/gce_util.go
View file @
3f109d6d
...
@@ -147,7 +147,7 @@ func (util *GCEDiskUtil) DetachDisk(pd *gcePersistentDisk, devicePath string) er
...
@@ -147,7 +147,7 @@ func (util *GCEDiskUtil) DetachDisk(pd *gcePersistentDisk, devicePath string) er
// This eliminates the necesisty to format a PD before it is used with a Pod on GCE.
// This eliminates the necesisty to format a PD before it is used with a Pod on GCE.
// TODO: port this script into Go and use it for all Linux platforms
// TODO: port this script into Go and use it for all Linux platforms
type
gceSafeFormatAndMount
struct
{
type
gceSafeFormatAndMount
struct
{
mount
.
Mounter
mount
.
Interface
runner
exec
.
Interface
runner
exec
.
Interface
}
}
...
...
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