@@ -24,7 +24,7 @@ import (
24
24
25
25
v1 "k8s.io/api/core/v1"
26
26
storage "k8s.io/api/storage/v1"
27
- apierrs "k8s.io/apimachinery/pkg/api/errors"
27
+ apierrors "k8s.io/apimachinery/pkg/api/errors"
28
28
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
29
29
"k8s.io/apimachinery/pkg/labels"
30
30
"k8s.io/apimachinery/pkg/util/sets"
@@ -534,16 +534,16 @@ func (ctrl *PersistentVolumeController) syncVolume(volume *v1.PersistentVolume)
534
534
// updated to Released state when PVC does not exist.
535
535
if volume .Status .Phase != v1 .VolumeReleased && volume .Status .Phase != v1 .VolumeFailed {
536
536
obj , err = ctrl .claimLister .PersistentVolumeClaims (volume .Spec .ClaimRef .Namespace ).Get (volume .Spec .ClaimRef .Name )
537
- if err != nil && ! apierrs .IsNotFound (err ) {
537
+ if err != nil && ! apierrors .IsNotFound (err ) {
538
538
return err
539
539
}
540
- found = ! apierrs .IsNotFound (err )
540
+ found = ! apierrors .IsNotFound (err )
541
541
if ! found {
542
542
obj , err = ctrl .kubeClient .CoreV1 ().PersistentVolumeClaims (volume .Spec .ClaimRef .Namespace ).Get (volume .Spec .ClaimRef .Name , metav1.GetOptions {})
543
- if err != nil && ! apierrs .IsNotFound (err ) {
543
+ if err != nil && ! apierrors .IsNotFound (err ) {
544
544
return err
545
545
}
546
- found = ! apierrs .IsNotFound (err )
546
+ found = ! apierrors .IsNotFound (err )
547
547
}
548
548
}
549
549
}
@@ -1391,7 +1391,7 @@ func (ctrl *PersistentVolumeController) provisionClaimOperation(
1391
1391
1392
1392
pvName := ctrl .getProvisionedVolumeNameForClaim (claim )
1393
1393
volume , err := ctrl .kubeClient .CoreV1 ().PersistentVolumes ().Get (pvName , metav1.GetOptions {})
1394
- if err != nil && ! apierrs .IsNotFound (err ) {
1394
+ if err != nil && ! apierrors .IsNotFound (err ) {
1395
1395
klog .V (3 ).Infof ("error reading persistent volume %q: %v" , pvName , err )
1396
1396
return pluginName , err
1397
1397
}
@@ -1489,7 +1489,7 @@ func (ctrl *PersistentVolumeController) provisionClaimOperation(
1489
1489
for i := 0 ; i < ctrl .createProvisionedPVRetryCount ; i ++ {
1490
1490
klog .V (4 ).Infof ("provisionClaimOperation [%s]: trying to save volume %s" , claimToClaimKey (claim ), volume .Name )
1491
1491
var newVol * v1.PersistentVolume
1492
- if newVol , err = ctrl .kubeClient .CoreV1 ().PersistentVolumes ().Create (volume ); err == nil || apierrs .IsAlreadyExists (err ) {
1492
+ if newVol , err = ctrl .kubeClient .CoreV1 ().PersistentVolumes ().Create (volume ); err == nil || apierrors .IsAlreadyExists (err ) {
1493
1493
// Save succeeded.
1494
1494
if err != nil {
1495
1495
klog .V (3 ).Infof ("volume %q for claim %q already exists, reusing" , volume .Name , claimToClaimKey (claim ))
0 commit comments