1
0
mirror of https://github.com/ceph/ceph-csi.git synced 2025-06-14 18:53:35 +00:00

rebase: update replaced k8s.io modules to v0.33.0

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos
2025-05-07 13:13:33 +02:00
committed by mergify[bot]
parent dd77e72800
commit 107407b44b
1723 changed files with 65035 additions and 175239 deletions
e2e
go.modgo.sum
vendor
github.com
NYTimes
containerd
coreos
cyphar
golang
google
grpc-ecosystem
opencontainers
go.etcd.io
go.opentelemetry.io
go.uber.org
golang.org
google.golang.org
gopkg.in
k8s.io
api
admission
v1
v1beta1
admissionregistration
apidiscovery
v2
v2beta1
apiserverinternal
v1alpha1
apps
authentication
v1
v1alpha1
v1beta1
authorization
v1
v1beta1
autoscaling
batch
certificates
coordination
core
discovery
events
v1
v1beta1
extensions
flowcontrol
v1
v1beta1
v1beta2
v1beta3
imagepolicy
v1alpha1
networking
node
v1
v1alpha1
v1beta1
policy
rbac
v1
v1alpha1
v1beta1
resource
scheduling
v1
v1alpha1
v1beta1
storage
storagemigration
v1alpha1
apiextensions-apiserver
pkg
apis
apiextensions
features
apimachinery
apiserver
pkg
admission
apis
apidiscovery
apiserver
audit
install
validation
flowcontrol
bootstrap
audit
authentication
authorization
cel
endpoints
registry
server
storage
storageversion
util
validation
plugin
pkg
audit
authenticator
authorizer
client-go
applyconfigurations
OWNERS
apps
autoscaling
certificates
coordination
core
discovery
doc.go
extensions
internal
networking
resource
storage
utils.go
discovery
dynamic
dynamicinformer
fake
features
gentype
informers
admissionregistration
apiserverinternal
apps
autoscaling
batch
certificates
coordination
core
discovery
doc.go
events
extensions
flowcontrol
generic.go
networking
node
policy
rbac
resource
scheduling
storage
storagemigration
kubernetes
clientset.godoc.go
fake
import.go
scheme
typed
admissionregistration
apiserverinternal
apps
authentication
authorization
autoscaling
batch
certificates
coordination
core
discovery
events
extensions
flowcontrol
networking
node
policy
rbac
resource
scheduling
storage
storagemigration
listers
pkg
apis
clientauthentication
version
rest
scale
doc.go
scheme
appsint
appsv1beta1
appsv1beta2
autoscalingv1
doc.go
extensionsint
extensionsv1beta1
tools
transport
util
cloud-provider
component-base
config
metrics
features
prometheus
workqueue
zpages
controller-manager
cri-api
cri-client
dynamic-resource-allocation
kms
kube-openapi
kube-scheduler
kubelet
pkg
apis
stats
v1alpha1
kubernetes
pkg
api
service
v1
apis
capabilities
cluster
controller
credentialprovider
features
fieldpath
kubelet
probe
scheduler
securitycontext
util
volume
test
utils
modules.txt

147
e2e/vendor/github.com/containerd/errdefs/resolve.go generated vendored Normal file

@ -0,0 +1,147 @@
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package errdefs
import "context"
// Resolve returns the first error found in the error chain which matches an
// error defined in this package or context error. A raw, unwrapped error is
// returned or ErrUnknown if no matching error is found.
//
// This is useful for determining a response code based on the outermost wrapped
// error rather than the original cause. For example, a not found error deep
// in the code may be wrapped as an invalid argument. When determining status
// code from Is* functions, the depth or ordering of the error is not
// considered.
//
// The search order is depth first, a wrapped error returned from any part of
// the chain from `Unwrap() error` will be returned before any joined errors
// as returned by `Unwrap() []error`.
func Resolve(err error) error {
if err == nil {
return nil
}
err = firstError(err)
if err == nil {
err = ErrUnknown
}
return err
}
func firstError(err error) error {
for {
switch err {
case ErrUnknown,
ErrInvalidArgument,
ErrNotFound,
ErrAlreadyExists,
ErrPermissionDenied,
ErrResourceExhausted,
ErrFailedPrecondition,
ErrConflict,
ErrNotModified,
ErrAborted,
ErrOutOfRange,
ErrNotImplemented,
ErrInternal,
ErrUnavailable,
ErrDataLoss,
ErrUnauthenticated,
context.DeadlineExceeded,
context.Canceled:
return err
}
switch e := err.(type) {
case customMessage:
err = e.err
case unknown:
return ErrUnknown
case invalidParameter:
return ErrInvalidArgument
case notFound:
return ErrNotFound
case alreadyExists:
return ErrAlreadyExists
case forbidden:
return ErrPermissionDenied
case resourceExhausted:
return ErrResourceExhausted
case failedPrecondition:
return ErrFailedPrecondition
case conflict:
return ErrConflict
case notModified:
return ErrNotModified
case aborted:
return ErrAborted
case errOutOfRange:
return ErrOutOfRange
case notImplemented:
return ErrNotImplemented
case system:
return ErrInternal
case unavailable:
return ErrUnavailable
case dataLoss:
return ErrDataLoss
case unauthorized:
return ErrUnauthenticated
case deadlineExceeded:
return context.DeadlineExceeded
case cancelled:
return context.Canceled
case interface{ Unwrap() error }:
err = e.Unwrap()
if err == nil {
return nil
}
case interface{ Unwrap() []error }:
for _, ue := range e.Unwrap() {
if fe := firstError(ue); fe != nil {
return fe
}
}
return nil
case interface{ Is(error) bool }:
for _, target := range []error{ErrUnknown,
ErrInvalidArgument,
ErrNotFound,
ErrAlreadyExists,
ErrPermissionDenied,
ErrResourceExhausted,
ErrFailedPrecondition,
ErrConflict,
ErrNotModified,
ErrAborted,
ErrOutOfRange,
ErrNotImplemented,
ErrInternal,
ErrUnavailable,
ErrDataLoss,
ErrUnauthenticated,
context.DeadlineExceeded,
context.Canceled} {
if e.Is(target) {
return target
}
}
return nil
default:
return nil
}
}
}