rebase: update K8s packages to v0.32.1

Update K8s packages in go.mod to v0.32.1

Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
Praveen M
2025-01-16 09:41:46 +05:30
committed by mergify[bot]
parent 5aef21ea4e
commit 7eb99fc6c9
2442 changed files with 273386 additions and 47788 deletions

View File

@ -21,4 +21,4 @@ limitations under the License.
// +groupName=coordination.k8s.io
package v1alpha1 // import "k8s.io/api/coordination/v1alpha1"
package v1alpha2 // import "k8s.io/api/coordination/v1alpha2"

View File

@ -15,9 +15,9 @@ limitations under the License.
*/
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: k8s.io/api/coordination/v1alpha1/generated.proto
// source: k8s.io/api/coordination/v1alpha2/generated.proto
package v1alpha1
package v1alpha2
import (
fmt "fmt"
@ -49,7 +49,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func (m *LeaseCandidate) Reset() { *m = LeaseCandidate{} }
func (*LeaseCandidate) ProtoMessage() {}
func (*LeaseCandidate) Descriptor() ([]byte, []int) {
return fileDescriptor_cb9e87df9da593c2, []int{0}
return fileDescriptor_c1ec5c989d262916, []int{0}
}
func (m *LeaseCandidate) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -77,7 +77,7 @@ var xxx_messageInfo_LeaseCandidate proto.InternalMessageInfo
func (m *LeaseCandidateList) Reset() { *m = LeaseCandidateList{} }
func (*LeaseCandidateList) ProtoMessage() {}
func (*LeaseCandidateList) Descriptor() ([]byte, []int) {
return fileDescriptor_cb9e87df9da593c2, []int{1}
return fileDescriptor_c1ec5c989d262916, []int{1}
}
func (m *LeaseCandidateList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -105,7 +105,7 @@ var xxx_messageInfo_LeaseCandidateList proto.InternalMessageInfo
func (m *LeaseCandidateSpec) Reset() { *m = LeaseCandidateSpec{} }
func (*LeaseCandidateSpec) ProtoMessage() {}
func (*LeaseCandidateSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_cb9e87df9da593c2, []int{2}
return fileDescriptor_c1ec5c989d262916, []int{2}
}
func (m *LeaseCandidateSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -131,53 +131,52 @@ func (m *LeaseCandidateSpec) XXX_DiscardUnknown() {
var xxx_messageInfo_LeaseCandidateSpec proto.InternalMessageInfo
func init() {
proto.RegisterType((*LeaseCandidate)(nil), "k8s.io.api.coordination.v1alpha1.LeaseCandidate")
proto.RegisterType((*LeaseCandidateList)(nil), "k8s.io.api.coordination.v1alpha1.LeaseCandidateList")
proto.RegisterType((*LeaseCandidateSpec)(nil), "k8s.io.api.coordination.v1alpha1.LeaseCandidateSpec")
proto.RegisterType((*LeaseCandidate)(nil), "k8s.io.api.coordination.v1alpha2.LeaseCandidate")
proto.RegisterType((*LeaseCandidateList)(nil), "k8s.io.api.coordination.v1alpha2.LeaseCandidateList")
proto.RegisterType((*LeaseCandidateSpec)(nil), "k8s.io.api.coordination.v1alpha2.LeaseCandidateSpec")
}
func init() {
proto.RegisterFile("k8s.io/api/coordination/v1alpha1/generated.proto", fileDescriptor_cb9e87df9da593c2)
proto.RegisterFile("k8s.io/api/coordination/v1alpha2/generated.proto", fileDescriptor_c1ec5c989d262916)
}
var fileDescriptor_cb9e87df9da593c2 = []byte{
// 570 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcb, 0x6e, 0xd3, 0x4c,
0x14, 0xc7, 0xe3, 0x36, 0xf9, 0x94, 0xcc, 0xd7, 0xa0, 0x30, 0x15, 0x92, 0x95, 0x85, 0x13, 0x65,
0x55, 0x21, 0x31, 0x6e, 0xa0, 0x42, 0x48, 0xec, 0x5c, 0x40, 0x42, 0x4a, 0x4b, 0xe5, 0x42, 0x25,
0x50, 0x17, 0x4c, 0xec, 0x53, 0x67, 0x48, 0x7c, 0xd1, 0x78, 0x52, 0x94, 0x5d, 0x17, 0x3c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0x0b,
0xe0, 0x31, 0x0b, 0x03, 0x3d, 0xaf, 0xdc, 0x3e, 0x4a, 0xdd, 0x96, 0xad, 0xf9, 0xa2, 0xbd, 0xd8,
0x8b, 0x5f, 0xa1, 0x0a, 0xf8, 0xfd, 0x9e, 0x3a, 0x7c, 0xc6, 0x17, 0x14, 0xaf, 0xa7, 0x7c, 0xe5,
0xf5, 0x52, 0xdd, 0x5e, 0x21, 0xf0, 0x8d, 0x86, 0xf6, 0x23, 0x0e, 0x57, 0xc0, 0x39, 0xb8, 0xe7,
0x42, 0xfe, 0x6f, 0x3c, 0x06, 0xb1, 0xfe, 0x5f, 0x7d, 0xf7, 0xa0, 0x64, 0x9d, 0x26, 0xa3, 0xda,
0xfe, 0xd9, 0x6a, 0xf9, 0xcf, 0xa8, 0xf6, 0x6c, 0xfd, 0x03, 0x41, 0x8e, 0xb3, 0x18, 0x5c, 0xf5,
0xc1, 0x52, 0x70, 0x60, 0xdf, 0x37, 0xca, 0x7a, 0x33, 0x1c, 0x1b, 0xb9, 0xdb, 0xb1, 0x91, 0xbb,
0x1b, 0x1b, 0xb9, 0x9b, 0xc4, 0xd0, 0x86, 0x89, 0xa1, 0xdd, 0x26, 0x86, 0x76, 0x97, 0x18, 0xda,
0xaf, 0xc4, 0xd0, 0xbe, 0xff, 0x36, 0x72, 0x9f, 0xea, 0x9b, 0xde, 0xc4, 0xbf, 0x01, 0x00, 0x00,
0xff, 0xff, 0x05, 0x28, 0x49, 0xd9, 0x36, 0x05, 0x00, 0x00,
var fileDescriptor_c1ec5c989d262916 = []byte{
// 555 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x8b, 0xd3, 0x4e,
0x18, 0xc7, 0x9b, 0xdd, 0xf6, 0x47, 0x3b, 0xbf, 0xad, 0xd4, 0x01, 0x21, 0xf4, 0x90, 0x96, 0x9e,
0x44, 0x70, 0x66, 0x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, 0x3e, 0x6b, 0xf7, 0xfe, 0xbf, 0xb9, 0xab, 0xea,
0xe2, 0x4e, 0x6e, 0x71, 0xe6, 0x42, 0xfc, 0x18, 0x55, 0x3b, 0x3c, 0x64, 0xf1, 0xf0, 0x02, 0xe2,
0x84, 0x8b, 0xd0, 0x2c, 0xea, 0xb4, 0x77, 0xb2, 0xb4, 0x55, 0x7b, 0x71, 0xd3, 0x59, 0xee, 0xc5,
0x4f, 0x50, 0x0d, 0x82, 0x41, 0x5f, 0x0f, 0x3e, 0xe7, 0x4b, 0x9a, 0x37, 0x33, 0xbe, 0xf6, 0x74,
0x65, 0xdf, 0x59, 0x23, 0xb0, 0x8b, 0xca, 0x89, 0x54, 0x6f, 0x8b, 0x3f, 0x34, 0xff, 0xd3, 0xf4,
0xf3, 0xfc, 0x8f, 0x70, 0x9e, 0xd5, 0x7f, 0x8f, 0x1b, 0x0f, 0x36, 0x7f, 0x0d, 0xc8, 0x69, 0xbe,
0x06, 0x4f, 0x3f, 0x9d, 0x1c, 0x73, 0x66, 0x62, 0xfb, 0xd9, 0x68, 0x62, 0x15, 0xae, 0x27, 0x56,
0xe1, 0x66, 0x62, 0x15, 0xbe, 0xa4, 0x96, 0x31, 0x4a, 0x2d, 0xe3, 0x3a, 0xb5, 0x8c, 0x9b, 0xd4,
0x32, 0x7e, 0xa4, 0x96, 0xf1, 0xf5, 0xa7, 0x55, 0x78, 0xdf, 0xdc, 0xf6, 0xd5, 0xfb, 0x13, 0x00,
0x00, 0xff, 0xff, 0x7f, 0x15, 0x63, 0xd0, 0x18, 0x05, 0x00, 0x00,
}
func (m *LeaseCandidate) Marshal() (dAtA []byte, err error) {
@ -290,15 +289,11 @@ func (m *LeaseCandidateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if len(m.PreferredStrategies) > 0 {
for iNdEx := len(m.PreferredStrategies) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.PreferredStrategies[iNdEx])
copy(dAtA[i:], m.PreferredStrategies[iNdEx])
i = encodeVarintGenerated(dAtA, i, uint64(len(m.PreferredStrategies[iNdEx])))
i--
dAtA[i] = 0x32
}
}
i -= len(m.Strategy)
copy(dAtA[i:], m.Strategy)
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Strategy)))
i--
dAtA[i] = 0x32
i -= len(m.EmulationVersion)
copy(dAtA[i:], m.EmulationVersion)
i = encodeVarintGenerated(dAtA, i, uint64(len(m.EmulationVersion)))
@ -402,12 +397,8 @@ func (m *LeaseCandidateSpec) Size() (n int) {
n += 1 + l + sovGenerated(uint64(l))
l = len(m.EmulationVersion)
n += 1 + l + sovGenerated(uint64(l))
if len(m.PreferredStrategies) > 0 {
for _, s := range m.PreferredStrategies {
l = len(s)
n += 1 + l + sovGenerated(uint64(l))
}
}
l = len(m.Strategy)
n += 1 + l + sovGenerated(uint64(l))
return n
}
@ -454,7 +445,7 @@ func (this *LeaseCandidateSpec) String() string {
`RenewTime:` + strings.Replace(fmt.Sprintf("%v", this.RenewTime), "MicroTime", "v1.MicroTime", 1) + `,`,
`BinaryVersion:` + fmt.Sprintf("%v", this.BinaryVersion) + `,`,
`EmulationVersion:` + fmt.Sprintf("%v", this.EmulationVersion) + `,`,
`PreferredStrategies:` + fmt.Sprintf("%v", this.PreferredStrategies) + `,`,
`Strategy:` + fmt.Sprintf("%v", this.Strategy) + `,`,
`}`,
}, "")
return s
@ -899,7 +890,7 @@ func (m *LeaseCandidateSpec) Unmarshal(dAtA []byte) error {
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PreferredStrategies", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@ -927,7 +918,7 @@ func (m *LeaseCandidateSpec) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PreferredStrategies = append(m.PreferredStrategies, k8s_io_api_coordination_v1.CoordinatedLeaseStrategy(dAtA[iNdEx:postIndex]))
m.Strategy = k8s_io_api_coordination_v1.CoordinatedLeaseStrategy(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex

View File

@ -19,7 +19,7 @@ limitations under the License.
syntax = "proto2";
package k8s.io.api.coordination.v1alpha1;
package k8s.io.api.coordination.v1alpha2;
import "k8s.io/api/coordination/v1/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
// Package-wide variables from generator "generated".
option go_package = "k8s.io/api/coordination/v1alpha1";
option go_package = "k8s.io/api/coordination/v1alpha2";
// LeaseCandidate defines a candidate for a Lease object.
// Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.
@ -78,8 +78,8 @@ message LeaseCandidateSpec {
optional .k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime renewTime = 3;
// BinaryVersion is the binary version. It must be in a semver format without leading `v`.
// This field is required when strategy is "OldestEmulationVersion"
// +optional
// This field is required.
// +required
optional string binaryVersion = 4;
// EmulationVersion is the emulation version. It must be in a semver format without leading `v`.
@ -88,18 +88,13 @@ message LeaseCandidateSpec {
// +optional
optional string emulationVersion = 5;
// PreferredStrategies indicates the list of strategies for picking the leader for coordinated leader election.
// The list is ordered, and the first strategy supersedes all other strategies. The list is used by coordinated
// leader election to make a decision about the final election strategy. This follows as
// - If all clients have strategy X as the first element in this list, strategy X will be used.
// - If a candidate has strategy [X] and another candidate has strategy [Y, X], Y supersedes X and strategy Y
// will be used.
// - If a candidate has strategy [X, Y] and another candidate has strategy [Y, X], this is a user error and leader
// election will not operate the Lease until resolved.
// Strategy is the strategy that coordinated leader election will use for picking the leader.
// If multiple candidates for the same Lease return different strategies, the strategy provided
// by the candidate with the latest BinaryVersion will be used. If there is still conflict,
// this is a user error and coordinated leader election will not operate the Lease until resolved.
// (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.
// +featureGate=CoordinatedLeaderElection
// +listType=atomic
// +required
repeated string preferredStrategies = 6;
optional string strategy = 6;
}

View File

@ -1,5 +1,5 @@
/*
Copyright 2018 The Kubernetes Authors.
Copyright 2024 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.
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
package v1alpha2
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -26,7 +26,7 @@ import (
const GroupName = "coordination.k8s.io"
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {

View File

@ -1,5 +1,5 @@
/*
Copyright 2018 The Kubernetes Authors.
Copyright 2024 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.
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
package v1alpha2
import (
v1 "k8s.io/api/coordination/v1"
@ -23,7 +23,7 @@ import (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:prerelease-lifecycle-gen:introduced=1.31
// +k8s:prerelease-lifecycle-gen:introduced=1.32
// LeaseCandidate defines a candidate for a Lease object.
// Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.
@ -61,31 +61,26 @@ type LeaseCandidateSpec struct {
// +optional
RenewTime *metav1.MicroTime `json:"renewTime,omitempty" protobuf:"bytes,3,opt,name=renewTime"`
// BinaryVersion is the binary version. It must be in a semver format without leading `v`.
// This field is required when strategy is "OldestEmulationVersion"
// +optional
BinaryVersion string `json:"binaryVersion,omitempty" protobuf:"bytes,4,opt,name=binaryVersion"`
// This field is required.
// +required
BinaryVersion string `json:"binaryVersion" protobuf:"bytes,4,name=binaryVersion"`
// EmulationVersion is the emulation version. It must be in a semver format without leading `v`.
// EmulationVersion must be less than or equal to BinaryVersion.
// This field is required when strategy is "OldestEmulationVersion"
// +optional
EmulationVersion string `json:"emulationVersion,omitempty" protobuf:"bytes,5,opt,name=emulationVersion"`
// PreferredStrategies indicates the list of strategies for picking the leader for coordinated leader election.
// The list is ordered, and the first strategy supersedes all other strategies. The list is used by coordinated
// leader election to make a decision about the final election strategy. This follows as
// - If all clients have strategy X as the first element in this list, strategy X will be used.
// - If a candidate has strategy [X] and another candidate has strategy [Y, X], Y supersedes X and strategy Y
// will be used.
// - If a candidate has strategy [X, Y] and another candidate has strategy [Y, X], this is a user error and leader
// election will not operate the Lease until resolved.
// Strategy is the strategy that coordinated leader election will use for picking the leader.
// If multiple candidates for the same Lease return different strategies, the strategy provided
// by the candidate with the latest BinaryVersion will be used. If there is still conflict,
// this is a user error and coordinated leader election will not operate the Lease until resolved.
// (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.
// +featureGate=CoordinatedLeaderElection
// +listType=atomic
// +required
PreferredStrategies []v1.CoordinatedLeaseStrategy `json:"preferredStrategies,omitempty" protobuf:"bytes,6,opt,name=preferredStrategies"`
Strategy v1.CoordinatedLeaseStrategy `json:"strategy,omitempty" protobuf:"bytes,6,opt,name=strategy"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:prerelease-lifecycle-gen:introduced=1.31
// +k8s:prerelease-lifecycle-gen:introduced=1.32
// LeaseCandidateList is a list of Lease objects.
type LeaseCandidateList struct {

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
package v1alpha2
// This file contains a collection of methods that can be used from go-restful to
// generate Swagger API documentation for its models. Please read this PR for more
@ -48,13 +48,13 @@ func (LeaseCandidateList) SwaggerDoc() map[string]string {
}
var map_LeaseCandidateSpec = map[string]string{
"": "LeaseCandidateSpec is a specification of a Lease.",
"leaseName": "LeaseName is the name of the lease for which this candidate is contending. This field is immutable.",
"pingTime": "PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime.",
"renewTime": "RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.",
"binaryVersion": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required when strategy is \"OldestEmulationVersion\"",
"emulationVersion": "EmulationVersion is the emulation version. It must be in a semver format without leading `v`. EmulationVersion must be less than or equal to BinaryVersion. This field is required when strategy is \"OldestEmulationVersion\"",
"preferredStrategies": "PreferredStrategies indicates the list of strategies for picking the leader for coordinated leader election. The list is ordered, and the first strategy supersedes all other strategies. The list is used by coordinated leader election to make a decision about the final election strategy. This follows as - If all clients have strategy X as the first element in this list, strategy X will be used. - If a candidate has strategy [X] and another candidate has strategy [Y, X], Y supersedes X and strategy Y\n will be used.\n- If a candidate has strategy [X, Y] and another candidate has strategy [Y, X], this is a user error and leader\n election will not operate the Lease until resolved.\n(Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.",
"": "LeaseCandidateSpec is a specification of a Lease.",
"leaseName": "LeaseName is the name of the lease for which this candidate is contending. This field is immutable.",
"pingTime": "PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime.",
"renewTime": "RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.",
"binaryVersion": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required.",
"emulationVersion": "EmulationVersion is the emulation version. It must be in a semver format without leading `v`. EmulationVersion must be less than or equal to BinaryVersion. This field is required when strategy is \"OldestEmulationVersion\"",
"strategy": "Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.",
}
func (LeaseCandidateSpec) SwaggerDoc() map[string]string {

View File

@ -19,10 +19,9 @@ limitations under the License.
// Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha1
package v1alpha2
import (
v1 "k8s.io/api/coordination/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
@ -97,11 +96,6 @@ func (in *LeaseCandidateSpec) DeepCopyInto(out *LeaseCandidateSpec) {
in, out := &in.RenewTime, &out.RenewTime
*out = (*in).DeepCopy()
}
if in.PreferredStrategies != nil {
in, out := &in.PreferredStrategies, &out.PreferredStrategies
*out = make([]v1.CoordinatedLeaseStrategy, len(*in))
copy(*out, *in)
}
return
}

View File

@ -19,40 +19,40 @@ limitations under the License.
// Code generated by prerelease-lifecycle-gen. DO NOT EDIT.
package v1alpha1
package v1alpha2
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
func (in *LeaseCandidate) APILifecycleIntroduced() (major, minor int) {
return 1, 31
return 1, 32
}
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
func (in *LeaseCandidate) APILifecycleDeprecated() (major, minor int) {
return 1, 34
return 1, 35
}
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
func (in *LeaseCandidate) APILifecycleRemoved() (major, minor int) {
return 1, 37
return 1, 38
}
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
func (in *LeaseCandidateList) APILifecycleIntroduced() (major, minor int) {
return 1, 31
return 1, 32
}
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
func (in *LeaseCandidateList) APILifecycleDeprecated() (major, minor int) {
return 1, 34
return 1, 35
}
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
func (in *LeaseCandidateList) APILifecycleRemoved() (major, minor int) {
return 1, 37
return 1, 38
}