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
52b3956d
Unverified
Commit
52b3956d
authored
Feb 08, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Feb 08, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #67638 from houjun41544/20180821
Fix fmt.Errorf messages
parents
fd633d19
aef797b7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
volume_resize_map.go
pkg/controller/volume/expand/cache/volume_resize_map.go
+3
-3
No files found.
pkg/controller/volume/expand/cache/volume_resize_map.go
View file @
52b3956d
...
@@ -185,7 +185,7 @@ func (resizeMap *volumeResizeMap) UpdatePVSize(pvcr *PVCWithResizeRequest, newSi
...
@@ -185,7 +185,7 @@ func (resizeMap *volumeResizeMap) UpdatePVSize(pvcr *PVCWithResizeRequest, newSi
oldData
,
err
:=
json
.
Marshal
(
pvClone
)
oldData
,
err
:=
json
.
Marshal
(
pvClone
)
if
err
!=
nil
{
if
err
!=
nil
{
return
fmt
.
Errorf
(
"Unexpected error marshaling
PV : %q with error
%v"
,
pvClone
.
Name
,
err
)
return
fmt
.
Errorf
(
"Unexpected error marshaling
old PV %q with error :
%v"
,
pvClone
.
Name
,
err
)
}
}
pvClone
.
Spec
.
Capacity
[
v1
.
ResourceStorage
]
=
newSize
pvClone
.
Spec
.
Capacity
[
v1
.
ResourceStorage
]
=
newSize
...
@@ -193,13 +193,13 @@ func (resizeMap *volumeResizeMap) UpdatePVSize(pvcr *PVCWithResizeRequest, newSi
...
@@ -193,13 +193,13 @@ func (resizeMap *volumeResizeMap) UpdatePVSize(pvcr *PVCWithResizeRequest, newSi
newData
,
err
:=
json
.
Marshal
(
pvClone
)
newData
,
err
:=
json
.
Marshal
(
pvClone
)
if
err
!=
nil
{
if
err
!=
nil
{
return
fmt
.
Errorf
(
"Unexpected error marshaling
PV : %q with error
%v"
,
pvClone
.
Name
,
err
)
return
fmt
.
Errorf
(
"Unexpected error marshaling
new PV %q with error :
%v"
,
pvClone
.
Name
,
err
)
}
}
patchBytes
,
err
:=
strategicpatch
.
CreateTwoWayMergePatch
(
oldData
,
newData
,
pvClone
)
patchBytes
,
err
:=
strategicpatch
.
CreateTwoWayMergePatch
(
oldData
,
newData
,
pvClone
)
if
err
!=
nil
{
if
err
!=
nil
{
return
fmt
.
Errorf
(
"Error Creating two way merge patch for
PV : %q with error
%v"
,
pvClone
.
Name
,
err
)
return
fmt
.
Errorf
(
"Error Creating two way merge patch for
PV %q with error :
%v"
,
pvClone
.
Name
,
err
)
}
}
_
,
updateErr
:=
resizeMap
.
kubeClient
.
CoreV1
()
.
PersistentVolumes
()
.
Patch
(
pvClone
.
Name
,
commontypes
.
StrategicMergePatchType
,
patchBytes
)
_
,
updateErr
:=
resizeMap
.
kubeClient
.
CoreV1
()
.
PersistentVolumes
()
.
Patch
(
pvClone
.
Name
,
commontypes
.
StrategicMergePatchType
,
patchBytes
)
...
...
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