unify alias of api errors under pkg and staging
This commit is contained in:
@@ -24,7 +24,7 @@ import (
|
||||
"sync"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
apierrs "k8s.io/apimachinery/pkg/api/errors"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
@@ -223,7 +223,7 @@ func (r *VolumeReactor) React(action core.Action) (handled bool, ret runtime.Obj
|
||||
return true, volume.DeepCopy(), nil
|
||||
}
|
||||
klog.V(4).Infof("GetVolume: volume %s not found", name)
|
||||
return true, nil, apierrs.NewNotFound(action.GetResource().GroupResource(), name)
|
||||
return true, nil, apierrors.NewNotFound(action.GetResource().GroupResource(), name)
|
||||
|
||||
case action.Matches("get", "persistentvolumeclaims"):
|
||||
name := action.(core.GetAction).GetName()
|
||||
@@ -233,7 +233,7 @@ func (r *VolumeReactor) React(action core.Action) (handled bool, ret runtime.Obj
|
||||
return true, claim.DeepCopy(), nil
|
||||
}
|
||||
klog.V(4).Infof("GetClaim: claim %s not found", name)
|
||||
return true, nil, apierrs.NewNotFound(action.GetResource().GroupResource(), name)
|
||||
return true, nil, apierrors.NewNotFound(action.GetResource().GroupResource(), name)
|
||||
|
||||
case action.Matches("delete", "persistentvolumes"):
|
||||
name := action.(core.DeleteAction).GetName()
|
||||
|
Reference in New Issue
Block a user