Update dependency go modules for k8s v1.27.0-rc.0
This commit is contained in:
38
vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/defaults.go
generated
vendored
Normal file
38
vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/defaults.go
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
Copyright 2023 The Kubernetes 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 internalversion
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// SetListOptionsDefaults sets defaults on the provided ListOptions if applicable.
|
||||
//
|
||||
// TODO(#115478): once the watch-list fg is always on we register this function in the scheme (via AddTypeDefaultingFunc).
|
||||
// TODO(#115478): when the function is registered in the scheme remove all callers of this method.
|
||||
func SetListOptionsDefaults(obj *ListOptions, isWatchListFeatureEnabled bool) {
|
||||
if !isWatchListFeatureEnabled {
|
||||
return
|
||||
}
|
||||
if obj.SendInitialEvents != nil || len(obj.ResourceVersionMatch) != 0 {
|
||||
return
|
||||
}
|
||||
legacy := obj.ResourceVersion == "" || obj.ResourceVersion == "0"
|
||||
if obj.Watch && legacy {
|
||||
turnOnInitialEvents := true
|
||||
obj.SendInitialEvents = &turnOnInitialEvents
|
||||
obj.ResourceVersionMatch = metav1.ResourceVersionMatchNotOlderThan
|
||||
}
|
||||
}
|
25
vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go
generated
vendored
25
vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go
generated
vendored
@@ -66,6 +66,31 @@ type ListOptions struct {
|
||||
// it does not recognize and will return a 410 error if the token can no longer be used because
|
||||
// it has expired.
|
||||
Continue string
|
||||
|
||||
// `sendInitialEvents=true` may be set together with `watch=true`.
|
||||
// In that case, the watch stream will begin with synthetic events to
|
||||
// produce the current state of objects in the collection. Once all such
|
||||
// events have been sent, a synthetic "Bookmark" event will be sent.
|
||||
// The bookmark will report the ResourceVersion (RV) corresponding to the
|
||||
// set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation.
|
||||
// Afterwards, the watch stream will proceed as usual, sending watch events
|
||||
// corresponding to changes (subsequent to the RV) to objects watched.
|
||||
//
|
||||
// When `sendInitialEvents` option is set, we require `resourceVersionMatch`
|
||||
// option to also be set. The semantic of the watch request is as following:
|
||||
// - `resourceVersionMatch` = NotOlderThan
|
||||
// is interpreted as "data at least as new as the provided `resourceVersion`"
|
||||
// and the bookmark event is send when the state is synced
|
||||
// to a `resourceVersion` at least as fresh as the one provided by the ListOptions.
|
||||
// If `resourceVersion` is unset, this is interpreted as "consistent read" and the
|
||||
// bookmark event is send when the state is synced at least to the moment
|
||||
// when request started being processed.
|
||||
// - `resourceVersionMatch` set to any other value or unset
|
||||
// Invalid error is returned.
|
||||
//
|
||||
// Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward
|
||||
// compatibility reasons) and to false otherwise.
|
||||
SendInitialEvents *bool
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
2
vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go
generated
vendored
2
vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go
generated
vendored
@@ -115,6 +115,7 @@ func autoConvert_internalversion_ListOptions_To_v1_ListOptions(in *ListOptions,
|
||||
out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
|
||||
out.Limit = in.Limit
|
||||
out.Continue = in.Continue
|
||||
out.SendInitialEvents = (*bool)(unsafe.Pointer(in.SendInitialEvents))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -137,6 +138,7 @@ func autoConvert_v1_ListOptions_To_internalversion_ListOptions(in *v1.ListOption
|
||||
out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
|
||||
out.Limit = in.Limit
|
||||
out.Continue = in.Continue
|
||||
out.SendInitialEvents = (*bool)(unsafe.Pointer(in.SendInitialEvents))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
5
vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.deepcopy.go
generated
vendored
5
vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.deepcopy.go
generated
vendored
@@ -75,6 +75,11 @@ func (in *ListOptions) DeepCopyInto(out *ListOptions) {
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
if in.SendInitialEvents != nil {
|
||||
in, out := &in.SendInitialEvents, &out.SendInitialEvents
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user