rebase: update kubernetes to 1.26.1

update kubernetes and its dependencies
to v1.26.1

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2023-02-01 18:06:36 +01:00
committed by mergify[bot]
parent e9e33fb851
commit 9c8de9471e
937 changed files with 75539 additions and 33050 deletions

View File

@ -17,6 +17,7 @@ limitations under the License.
package meta
import (
"errors"
"fmt"
"k8s.io/apimachinery/pkg/runtime/schema"
@ -43,6 +44,11 @@ func (e *AmbiguousResourceError) Error() string {
return fmt.Sprintf("%v matches multiple resources or kinds", e.PartialResource)
}
func (*AmbiguousResourceError) Is(target error) bool {
_, ok := target.(*AmbiguousResourceError)
return ok
}
// AmbiguousKindError is returned if the RESTMapper finds multiple matches for a kind
type AmbiguousKindError struct {
PartialKind schema.GroupVersionKind
@ -63,16 +69,16 @@ func (e *AmbiguousKindError) Error() string {
return fmt.Sprintf("%v matches multiple resources or kinds", e.PartialKind)
}
func (*AmbiguousKindError) Is(target error) bool {
_, ok := target.(*AmbiguousKindError)
return ok
}
func IsAmbiguousError(err error) bool {
if err == nil {
return false
}
switch err.(type) {
case *AmbiguousResourceError, *AmbiguousKindError:
return true
default:
return false
}
return errors.Is(err, &AmbiguousResourceError{}) || errors.Is(err, &AmbiguousKindError{})
}
// NoResourceMatchError is returned if the RESTMapper can't find any match for a resource
@ -84,6 +90,11 @@ func (e *NoResourceMatchError) Error() string {
return fmt.Sprintf("no matches for %v", e.PartialResource)
}
func (*NoResourceMatchError) Is(target error) bool {
_, ok := target.(*NoResourceMatchError)
return ok
}
// NoKindMatchError is returned if the RESTMapper can't find any match for a kind
type NoKindMatchError struct {
// GroupKind is the API group and kind that was searched
@ -108,14 +119,14 @@ func (e *NoKindMatchError) Error() string {
}
}
func (*NoKindMatchError) Is(target error) bool {
_, ok := target.(*NoKindMatchError)
return ok
}
func IsNoMatchError(err error) bool {
if err == nil {
return false
}
switch err.(type) {
case *NoResourceMatchError, *NoKindMatchError:
return true
default:
return false
}
return errors.Is(err, &NoResourceMatchError{}) || errors.Is(err, &NoKindMatchError{})
}