rebase: update kubernetes dep to 1.24.0

As kubernetes 1.24.0 is released, updating
kubernetes dependencies to 1.24.0

updates: #3086

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2022-05-05 08:17:06 +05:30
committed by mergify[bot]
parent fc1529f268
commit c4f79d455f
959 changed files with 80055 additions and 27456 deletions

View File

@ -1,20 +1,17 @@
# See the OWNERS docs at https://go.k8s.io/owners
reviewers:
- thockin
- lavalamp
- smarterclayton
- wojtek-t
- deads2k
- brendandburns
- derekwaynecarr
- caesarxuchao
- mikedanese
- liggitt
- saad-ali
- janetkuo
- tallclair
- dims
- hongchaodeng
- krousey
- cjcullen
- thockin
- lavalamp
- smarterclayton
- wojtek-t
- deads2k
- derekwaynecarr
- caesarxuchao
- mikedanese
- liggitt
- saad-ali
- janetkuo
- tallclair
- dims
- cjcullen

View File

@ -523,7 +523,7 @@ func NewGenericServerResponse(code int, verb string, qualifiedResource schema.Gr
}
// IsNotFound returns true if the specified error was created by NewNotFound.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsNotFound(err error) bool {
reason, code := reasonAndCodeForError(err)
if reason == metav1.StatusReasonNotFound {
@ -536,13 +536,13 @@ func IsNotFound(err error) bool {
}
// IsAlreadyExists determines if the err is an error which indicates that a specified resource already exists.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsAlreadyExists(err error) bool {
return ReasonForError(err) == metav1.StatusReasonAlreadyExists
}
// IsConflict determines if the err is an error which indicates the provided update conflicts.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsConflict(err error) bool {
reason, code := reasonAndCodeForError(err)
if reason == metav1.StatusReasonConflict {
@ -555,7 +555,7 @@ func IsConflict(err error) bool {
}
// IsInvalid determines if the err is an error which indicates the provided resource is not valid.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsInvalid(err error) bool {
reason, code := reasonAndCodeForError(err)
if reason == metav1.StatusReasonInvalid {
@ -568,7 +568,7 @@ func IsInvalid(err error) bool {
}
// IsGone is true if the error indicates the requested resource is no longer available.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsGone(err error) bool {
reason, code := reasonAndCodeForError(err)
if reason == metav1.StatusReasonGone {
@ -582,13 +582,13 @@ func IsGone(err error) bool {
// IsResourceExpired is true if the error indicates the resource has expired and the current action is
// no longer possible.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsResourceExpired(err error) bool {
return ReasonForError(err) == metav1.StatusReasonExpired
}
// IsNotAcceptable determines if err is an error which indicates that the request failed due to an invalid Accept header
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsNotAcceptable(err error) bool {
reason, code := reasonAndCodeForError(err)
if reason == metav1.StatusReasonNotAcceptable {
@ -601,7 +601,7 @@ func IsNotAcceptable(err error) bool {
}
// IsUnsupportedMediaType determines if err is an error which indicates that the request failed due to an invalid Content-Type header
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsUnsupportedMediaType(err error) bool {
reason, code := reasonAndCodeForError(err)
if reason == metav1.StatusReasonUnsupportedMediaType {
@ -615,7 +615,7 @@ func IsUnsupportedMediaType(err error) bool {
// IsMethodNotSupported determines if the err is an error which indicates the provided action could not
// be performed because it is not supported by the server.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsMethodNotSupported(err error) bool {
reason, code := reasonAndCodeForError(err)
if reason == metav1.StatusReasonMethodNotAllowed {
@ -628,7 +628,7 @@ func IsMethodNotSupported(err error) bool {
}
// IsServiceUnavailable is true if the error indicates the underlying service is no longer available.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsServiceUnavailable(err error) bool {
reason, code := reasonAndCodeForError(err)
if reason == metav1.StatusReasonServiceUnavailable {
@ -641,7 +641,7 @@ func IsServiceUnavailable(err error) bool {
}
// IsBadRequest determines if err is an error which indicates that the request is invalid.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsBadRequest(err error) bool {
reason, code := reasonAndCodeForError(err)
if reason == metav1.StatusReasonBadRequest {
@ -655,7 +655,7 @@ func IsBadRequest(err error) bool {
// IsUnauthorized determines if err is an error which indicates that the request is unauthorized and
// requires authentication by the user.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsUnauthorized(err error) bool {
reason, code := reasonAndCodeForError(err)
if reason == metav1.StatusReasonUnauthorized {
@ -669,7 +669,7 @@ func IsUnauthorized(err error) bool {
// IsForbidden determines if err is an error which indicates that the request is forbidden and cannot
// be completed as requested.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsForbidden(err error) bool {
reason, code := reasonAndCodeForError(err)
if reason == metav1.StatusReasonForbidden {
@ -683,7 +683,7 @@ func IsForbidden(err error) bool {
// IsTimeout determines if err is an error which indicates that request times out due to long
// processing.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsTimeout(err error) bool {
reason, code := reasonAndCodeForError(err)
if reason == metav1.StatusReasonTimeout {
@ -697,7 +697,7 @@ func IsTimeout(err error) bool {
// IsServerTimeout determines if err is an error which indicates that the request needs to be retried
// by the client.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsServerTimeout(err error) bool {
// do not check the status code, because no https status code exists that can
// be scoped to retryable timeouts.
@ -705,7 +705,7 @@ func IsServerTimeout(err error) bool {
}
// IsInternalError determines if err is an error which indicates an internal server error.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsInternalError(err error) bool {
reason, code := reasonAndCodeForError(err)
if reason == metav1.StatusReasonInternalError {
@ -719,7 +719,7 @@ func IsInternalError(err error) bool {
// IsTooManyRequests determines if err is an error which indicates that there are too many requests
// that the server cannot handle.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsTooManyRequests(err error) bool {
reason, code := reasonAndCodeForError(err)
if reason == metav1.StatusReasonTooManyRequests {
@ -737,7 +737,7 @@ func IsTooManyRequests(err error) bool {
// IsRequestEntityTooLargeError determines if err is an error which indicates
// the request entity is too large.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsRequestEntityTooLargeError(err error) bool {
reason, code := reasonAndCodeForError(err)
if reason == metav1.StatusReasonRequestEntityTooLarge {
@ -755,7 +755,7 @@ func IsRequestEntityTooLargeError(err error) bool {
// IsUnexpectedServerError returns true if the server response was not in the expected API format,
// and may be the result of another HTTP actor.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsUnexpectedServerError(err error) bool {
if status := APIStatus(nil); errors.As(err, &status) && status.Status().Details != nil {
for _, cause := range status.Status().Details.Causes {
@ -768,7 +768,7 @@ func IsUnexpectedServerError(err error) bool {
}
// IsUnexpectedObjectError determines if err is due to an unexpected object from the master.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func IsUnexpectedObjectError(err error) bool {
uoe := &UnexpectedObjectError{}
return err != nil && errors.As(err, &uoe)
@ -778,7 +778,7 @@ func IsUnexpectedObjectError(err error) bool {
// suggested seconds to wait, or false if the error does not imply a wait. It does not
// address whether the error *should* be retried, since some errors (like a 3xx) may
// request delay without retry.
// It supports wrapped errors.
// It supports wrapped errors and returns false when the error is nil.
func SuggestsClientDelay(err error) (int, bool) {
if t := APIStatus(nil); errors.As(err, &t) && t.Status().Details != nil {
switch t.Status().Reason {
@ -795,7 +795,8 @@ func SuggestsClientDelay(err error) (int, bool) {
}
// ReasonForError returns the HTTP status for a particular error.
// It supports wrapped errors.
// It supports wrapped errors and returns StatusReasonUnknown when
// the error is nil or doesn't have a status.
func ReasonForError(err error) metav1.StatusReason {
if status := APIStatus(nil); errors.As(err, &status) {
return status.Status().Reason

View File

@ -1,18 +1,14 @@
# See the OWNERS docs at https://go.k8s.io/owners
reviewers:
- thockin
- smarterclayton
- wojtek-t
- deads2k
- brendandburns
- derekwaynecarr
- caesarxuchao
- mikedanese
- liggitt
- janetkuo
- ncdc
- dims
- krousey
- resouer
- mfojtik
- thockin
- smarterclayton
- wojtek-t
- deads2k
- derekwaynecarr
- caesarxuchao
- mikedanese
- liggitt
- janetkuo
- ncdc
- dims

View File

@ -130,7 +130,7 @@ func AsPartialObjectMetadata(m metav1.Object) *metav1.PartialObjectMetadata {
Annotations: m.GetAnnotations(),
OwnerReferences: m.GetOwnerReferences(),
Finalizers: m.GetFinalizers(),
ClusterName: m.GetClusterName(),
ZZZ_DeprecatedClusterName: m.GetZZZ_DeprecatedClusterName(),
ManagedFields: m.GetManagedFields(),
},
}

View File

@ -521,10 +521,9 @@ func (m *DefaultRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string
}
// MaybeResetRESTMapper calls Reset() on the mapper if it is a ResettableRESTMapper.
func MaybeResetRESTMapper(mapper RESTMapper) bool {
func MaybeResetRESTMapper(mapper RESTMapper) {
m, ok := mapper.(ResettableRESTMapper)
if ok {
m.Reset()
}
return ok
}

View File

@ -1,12 +1,11 @@
# See the OWNERS docs at https://go.k8s.io/owners
reviewers:
- thockin
- lavalamp
- smarterclayton
- wojtek-t
- derekwaynecarr
- mikedanese
- saad-ali
- janetkuo
- xiang90
- thockin
- lavalamp
- smarterclayton
- wojtek-t
- derekwaynecarr
- mikedanese
- saad-ali
- janetkuo

View File

@ -107,8 +107,8 @@ var fileDescriptor_612bba87bd70906c = []byte{
0x56, 0x5c, 0x52, 0x94, 0x99, 0x97, 0x2e, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe5, 0x59,
0x89, 0xcc, 0x58, 0x20, 0xcf, 0xd0, 0xb1, 0x50, 0x9e, 0x61, 0xc2, 0x42, 0x79, 0x86, 0x05, 0x0b,
0xe5, 0x19, 0x1a, 0xee, 0x28, 0x30, 0x28, 0xd9, 0x72, 0xf1, 0xc2, 0x74, 0x86, 0x25, 0xe6, 0x94,
0xa6, 0x92, 0xa6, 0xdd, 0x49, 0xef, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c,
0xa6, 0x92, 0xa6, 0xdd, 0xc9, 0xeb, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c,
0x94, 0x63, 0x68, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x37,
0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0x43, 0x14, 0x07, 0xcc, 0x5f,
0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x21, 0x76, 0x9f, 0x66, 0x4d, 0x01, 0x00, 0x00,
0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0x43, 0x94, 0x0a, 0x31, 0x21,
0x05, 0x08, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x70, 0x98, 0xa3, 0x69, 0x01, 0x00, 0x00,
}

View File

@ -22,7 +22,7 @@ syntax = "proto2";
package k8s.io.apimachinery.pkg.api.resource;
// Package-wide variables from generator "generated".
option go_package = "resource";
option go_package = "k8s.io/apimachinery/pkg/api/resource";
// Quantity is a fixed-point representation of a number.
// It provides convenient marshaling/unmarshaling in JSON and YAML,

View File

@ -397,6 +397,10 @@ func (_ Quantity) OpenAPISchemaType() []string { return []string{"string"} }
// the OpenAPI spec of this type.
func (_ Quantity) OpenAPISchemaFormat() string { return "" }
// OpenAPIV3OneOfTypes is used by the kube-openapi generator when constructing
// the OpenAPI v3 spec of this type.
func (Quantity) OpenAPIV3OneOfTypes() []string { return []string{"string", "number"} }
// CanonicalizeBytes returns the canonical form of q and its suffix (see comment on Quantity).
//
// Note about BinarySI:

View File

@ -40,8 +40,8 @@ var BannedOwners = map[schema.GroupVersionKind]struct{}{
{Group: "", Version: "v1", Kind: "Event"}: {},
}
// ValidateClusterName can be used to check whether the given cluster name is valid.
var ValidateClusterName = NameIsDNS1035Label
// ValidateZZZ_DeprecatedClusterName can be used to check whether the given cluster name is valid.
var ValidateZZZ_DeprecatedClusterName = NameIsDNS1035Label
// ValidateAnnotations validates that a set of annotations are correctly defined.
func ValidateAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
@ -184,9 +184,9 @@ func ValidateObjectMetaAccessor(meta metav1.Object, requiresNamespace bool, name
allErrs = append(allErrs, field.Forbidden(fldPath.Child("namespace"), "not allowed on this type"))
}
}
if len(meta.GetClusterName()) != 0 {
for _, msg := range ValidateClusterName(meta.GetClusterName(), false) {
allErrs = append(allErrs, field.Invalid(fldPath.Child("clusterName"), meta.GetClusterName(), msg))
if len(meta.GetZZZ_DeprecatedClusterName()) != 0 {
for _, msg := range ValidateZZZ_DeprecatedClusterName(meta.GetZZZ_DeprecatedClusterName(), false) {
allErrs = append(allErrs, field.Invalid(fldPath.Child("clusterName"), meta.GetZZZ_DeprecatedClusterName(), msg))
}
}
@ -261,7 +261,7 @@ func ValidateObjectMetaAccessorUpdate(newMeta, oldMeta metav1.Object, fldPath *f
allErrs = append(allErrs, ValidateImmutableField(newMeta.GetCreationTimestamp(), oldMeta.GetCreationTimestamp(), fldPath.Child("creationTimestamp"))...)
allErrs = append(allErrs, ValidateImmutableField(newMeta.GetDeletionTimestamp(), oldMeta.GetDeletionTimestamp(), fldPath.Child("deletionTimestamp"))...)
allErrs = append(allErrs, ValidateImmutableField(newMeta.GetDeletionGracePeriodSeconds(), oldMeta.GetDeletionGracePeriodSeconds(), fldPath.Child("deletionGracePeriodSeconds"))...)
allErrs = append(allErrs, ValidateImmutableField(newMeta.GetClusterName(), oldMeta.GetClusterName(), fldPath.Child("clusterName"))...)
allErrs = append(allErrs, ValidateImmutableField(newMeta.GetZZZ_DeprecatedClusterName(), oldMeta.GetZZZ_DeprecatedClusterName(), fldPath.Child("clusterName"))...)
allErrs = append(allErrs, v1validation.ValidateLabels(newMeta.GetLabels(), fldPath.Child("labels"))...)
allErrs = append(allErrs, ValidateAnnotations(newMeta.GetAnnotations(), fldPath.Child("annotations"))...)