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
6ae0199e
Commit
6ae0199e
authored
Mar 24, 2017
by
Kubernetes Submit Queue
Committed by
GitHub
Mar 24, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #42402 from jorenhehe/pv-typo
Automatic merge from submit-queue fix pv_controller typos ```release-note NONE ```
parents
e0817ef8
42c39d6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
pv_controller.go
pkg/controller/volume/persistentvolume/pv_controller.go
+4
-4
No files found.
pkg/controller/volume/persistentvolume/pv_controller.go
View file @
6ae0199e
...
@@ -560,7 +560,7 @@ func (ctrl *PersistentVolumeController) syncVolume(volume *v1.PersistentVolume)
...
@@ -560,7 +560,7 @@ func (ctrl *PersistentVolumeController) syncVolume(volume *v1.PersistentVolume)
// updateClaimStatus saves new claim.Status to API server.
// updateClaimStatus saves new claim.Status to API server.
// Parameters:
// Parameters:
// claim - claim to update
// claim - claim to update
// phase
phase
- phase to set
// phase - phase to set
// volume - volume which Capacity is set into claim.Status.Capacity
// volume - volume which Capacity is set into claim.Status.Capacity
func
(
ctrl
*
PersistentVolumeController
)
updateClaimStatus
(
claim
*
v1
.
PersistentVolumeClaim
,
phase
v1
.
PersistentVolumeClaimPhase
,
volume
*
v1
.
PersistentVolume
)
(
*
v1
.
PersistentVolumeClaim
,
error
)
{
func
(
ctrl
*
PersistentVolumeController
)
updateClaimStatus
(
claim
*
v1
.
PersistentVolumeClaim
,
phase
v1
.
PersistentVolumeClaimPhase
,
volume
*
v1
.
PersistentVolume
)
(
*
v1
.
PersistentVolumeClaim
,
error
)
{
glog
.
V
(
4
)
.
Infof
(
"updating PersistentVolumeClaim[%s] status: set phase %s"
,
claimToClaimKey
(
claim
),
phase
)
glog
.
V
(
4
)
.
Infof
(
"updating PersistentVolumeClaim[%s] status: set phase %s"
,
claimToClaimKey
(
claim
),
phase
)
...
@@ -634,7 +634,7 @@ func (ctrl *PersistentVolumeController) updateClaimStatus(claim *v1.PersistentVo
...
@@ -634,7 +634,7 @@ func (ctrl *PersistentVolumeController) updateClaimStatus(claim *v1.PersistentVo
// the status has actually changed from the version saved in API server.
// the status has actually changed from the version saved in API server.
// Parameters:
// Parameters:
// claim - claim to update
// claim - claim to update
// phase
phase
- phase to set
// phase - phase to set
// volume - volume which Capacity is set into claim.Status.Capacity
// volume - volume which Capacity is set into claim.Status.Capacity
// eventtype, reason, message - event to send, see EventRecorder.Event()
// eventtype, reason, message - event to send, see EventRecorder.Event()
func
(
ctrl
*
PersistentVolumeController
)
updateClaimStatusWithEvent
(
claim
*
v1
.
PersistentVolumeClaim
,
phase
v1
.
PersistentVolumeClaimPhase
,
volume
*
v1
.
PersistentVolume
,
eventtype
,
reason
,
message
string
)
(
*
v1
.
PersistentVolumeClaim
,
error
)
{
func
(
ctrl
*
PersistentVolumeController
)
updateClaimStatusWithEvent
(
claim
*
v1
.
PersistentVolumeClaim
,
phase
v1
.
PersistentVolumeClaimPhase
,
volume
*
v1
.
PersistentVolume
,
eventtype
,
reason
,
message
string
)
(
*
v1
.
PersistentVolumeClaim
,
error
)
{
...
@@ -717,7 +717,7 @@ func (ctrl *PersistentVolumeController) updateVolumePhaseWithEvent(volume *v1.Pe
...
@@ -717,7 +717,7 @@ func (ctrl *PersistentVolumeController) updateVolumePhaseWithEvent(volume *v1.Pe
return
newVol
,
nil
return
newVol
,
nil
}
}
// bindVolumeToClaim modifes given volume to be bound to a claim and saves it to
// bindVolumeToClaim modif
i
es given volume to be bound to a claim and saves it to
// API server. The claim is not modified in this method!
// API server. The claim is not modified in this method!
func
(
ctrl
*
PersistentVolumeController
)
bindVolumeToClaim
(
volume
*
v1
.
PersistentVolume
,
claim
*
v1
.
PersistentVolumeClaim
)
(
*
v1
.
PersistentVolume
,
error
)
{
func
(
ctrl
*
PersistentVolumeController
)
bindVolumeToClaim
(
volume
*
v1
.
PersistentVolume
,
claim
*
v1
.
PersistentVolumeClaim
)
(
*
v1
.
PersistentVolume
,
error
)
{
glog
.
V
(
4
)
.
Infof
(
"updating PersistentVolume[%s]: binding to %q"
,
volume
.
Name
,
claimToClaimKey
(
claim
))
glog
.
V
(
4
)
.
Infof
(
"updating PersistentVolume[%s]: binding to %q"
,
volume
.
Name
,
claimToClaimKey
(
claim
))
...
@@ -896,7 +896,7 @@ func (ctrl *PersistentVolumeController) bind(volume *v1.PersistentVolume, claim
...
@@ -896,7 +896,7 @@ func (ctrl *PersistentVolumeController) bind(volume *v1.PersistentVolume, claim
func
(
ctrl
*
PersistentVolumeController
)
unbindVolume
(
volume
*
v1
.
PersistentVolume
)
error
{
func
(
ctrl
*
PersistentVolumeController
)
unbindVolume
(
volume
*
v1
.
PersistentVolume
)
error
{
glog
.
V
(
4
)
.
Infof
(
"updating PersistentVolume[%s]: rolling back binding from %q"
,
volume
.
Name
,
claimrefToClaimKey
(
volume
.
Spec
.
ClaimRef
))
glog
.
V
(
4
)
.
Infof
(
"updating PersistentVolume[%s]: rolling back binding from %q"
,
volume
.
Name
,
claimrefToClaimKey
(
volume
.
Spec
.
ClaimRef
))
// Save the PV only when any modification is nec
c
essary.
// Save the PV only when any modification is necessary.
clone
,
err
:=
api
.
Scheme
.
DeepCopy
(
volume
)
clone
,
err
:=
api
.
Scheme
.
DeepCopy
(
volume
)
if
err
!=
nil
{
if
err
!=
nil
{
return
fmt
.
Errorf
(
"Error cloning pv: %v"
,
err
)
return
fmt
.
Errorf
(
"Error cloning pv: %v"
,
err
)
...
...
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