mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 13:31:52 +00:00
Merge pull request #42402 from jorenhehe/pv-typo
Automatic merge from submit-queue fix pv_controller typos ```release-note NONE ```
This commit is contained in:
commit
6ae0199eb0
@ -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
|
||||||
// phasephase - 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
|
|||||||
// 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
|
||||||
// phasephase - 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
|
|||||||
return newVol, nil
|
return newVol, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// bindVolumeToClaim modifes given volume to be bound to a claim and saves it to
|
// bindVolumeToClaim modifies 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
|
|||||||
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 neccessary.
|
// 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)
|
||||||
|
Loading…
Reference in New Issue
Block a user