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
f533e378
Commit
f533e378
authored
Jun 06, 2018
by
andyzhangx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
specify external resource group in ResizeDisk
fix issue
parent
e6fdcb4a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
azure_managedDiskController.go
...udprovider/providers/azure/azure_managedDiskController.go
+8
-2
azure_dd.go
pkg/volume/azure_dd/azure_dd.go
+2
-2
No files found.
pkg/cloudprovider/providers/azure/azure_managedDiskController.go
View file @
f533e378
...
@@ -148,11 +148,17 @@ func (c *ManagedDiskController) getDisk(diskName string) (string, string, error)
...
@@ -148,11 +148,17 @@ func (c *ManagedDiskController) getDisk(diskName string) (string, string, error)
}
}
// ResizeDisk Expand the disk to new size
// ResizeDisk Expand the disk to new size
func
(
c
*
ManagedDiskController
)
ResizeDisk
(
disk
Name
string
,
oldSize
resource
.
Quantity
,
newSize
resource
.
Quantity
)
(
resource
.
Quantity
,
error
)
{
func
(
c
*
ManagedDiskController
)
ResizeDisk
(
disk
URI
string
,
oldSize
resource
.
Quantity
,
newSize
resource
.
Quantity
)
(
resource
.
Quantity
,
error
)
{
ctx
,
cancel
:=
getContextWithCancel
()
ctx
,
cancel
:=
getContextWithCancel
()
defer
cancel
()
defer
cancel
()
result
,
err
:=
c
.
common
.
cloud
.
DisksClient
.
Get
(
ctx
,
c
.
common
.
resourceGroup
,
diskName
)
diskName
:=
path
.
Base
(
diskURI
)
resourceGroup
,
err
:=
getResourceGroupFromDiskURI
(
diskURI
)
if
err
!=
nil
{
return
oldSize
,
err
}
result
,
err
:=
c
.
common
.
cloud
.
DisksClient
.
Get
(
ctx
,
resourceGroup
,
diskName
)
if
err
!=
nil
{
if
err
!=
nil
{
return
oldSize
,
err
return
oldSize
,
err
}
}
...
...
pkg/volume/azure_dd/azure_dd.go
View file @
f533e378
...
@@ -58,7 +58,7 @@ type DiskController interface {
...
@@ -58,7 +58,7 @@ type DiskController interface {
DeleteVolume
(
diskURI
string
)
error
DeleteVolume
(
diskURI
string
)
error
// Expand the disk to new size
// Expand the disk to new size
ResizeDisk
(
disk
Name
string
,
oldSize
resource
.
Quantity
,
newSize
resource
.
Quantity
)
(
resource
.
Quantity
,
error
)
ResizeDisk
(
disk
URI
string
,
oldSize
resource
.
Quantity
,
newSize
resource
.
Quantity
)
(
resource
.
Quantity
,
error
)
}
}
type
azureDataDiskPlugin
struct
{
type
azureDataDiskPlugin
struct
{
...
@@ -242,7 +242,7 @@ func (plugin *azureDataDiskPlugin) ExpandVolumeDevice(
...
@@ -242,7 +242,7 @@ func (plugin *azureDataDiskPlugin) ExpandVolumeDevice(
return
oldSize
,
err
return
oldSize
,
err
}
}
return
diskController
.
ResizeDisk
(
spec
.
PersistentVolume
.
Spec
.
AzureDisk
.
D
iskName
,
oldSize
,
newSize
)
return
diskController
.
ResizeDisk
(
spec
.
PersistentVolume
.
Spec
.
AzureDisk
.
D
ataDiskURI
,
oldSize
,
newSize
)
}
}
func
(
plugin
*
azureDataDiskPlugin
)
ConstructVolumeSpec
(
volumeName
,
mountPath
string
)
(
*
volume
.
Spec
,
error
)
{
func
(
plugin
*
azureDataDiskPlugin
)
ConstructVolumeSpec
(
volumeName
,
mountPath
string
)
(
*
volume
.
Spec
,
error
)
{
...
...
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