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

@ -19,20 +19,20 @@ limitations under the License.
package v1
import (
apicoordinationv1 "k8s.io/api/coordination/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
coordinationv1 "k8s.io/api/coordination/v1"
apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
internal "k8s.io/client-go/applyconfigurations/internal"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// LeaseApplyConfiguration represents a declarative configuration of the Lease type for use
// with apply.
type LeaseApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *LeaseSpecApplyConfiguration `json:"spec,omitempty"`
metav1.TypeMetaApplyConfiguration `json:",inline"`
*metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *LeaseSpecApplyConfiguration `json:"spec,omitempty"`
}
// Lease constructs a declarative configuration of the Lease type for use with
@ -57,18 +57,18 @@ func Lease(name, namespace string) *LeaseApplyConfiguration {
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental!
func ExtractLease(lease *apicoordinationv1.Lease, fieldManager string) (*LeaseApplyConfiguration, error) {
func ExtractLease(lease *coordinationv1.Lease, fieldManager string) (*LeaseApplyConfiguration, error) {
return extractLease(lease, fieldManager, "")
}
// ExtractLeaseStatus is the same as ExtractLease except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractLeaseStatus(lease *apicoordinationv1.Lease, fieldManager string) (*LeaseApplyConfiguration, error) {
func ExtractLeaseStatus(lease *coordinationv1.Lease, fieldManager string) (*LeaseApplyConfiguration, error) {
return extractLease(lease, fieldManager, "status")
}
func extractLease(lease *apicoordinationv1.Lease, fieldManager string, subresource string) (*LeaseApplyConfiguration, error) {
func extractLease(lease *coordinationv1.Lease, fieldManager string, subresource string) (*LeaseApplyConfiguration, error) {
b := &LeaseApplyConfiguration{}
err := managedfields.ExtractInto(lease, internal.Parser().Type("io.k8s.api.coordination.v1.Lease"), fieldManager, b, subresource)
if err != nil {
@ -86,7 +86,7 @@ func extractLease(lease *apicoordinationv1.Lease, fieldManager string, subresour
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithKind(value string) *LeaseApplyConfiguration {
b.Kind = &value
b.TypeMetaApplyConfiguration.Kind = &value
return b
}
@ -94,7 +94,7 @@ func (b *LeaseApplyConfiguration) WithKind(value string) *LeaseApplyConfiguratio
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIVersion field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithAPIVersion(value string) *LeaseApplyConfiguration {
b.APIVersion = &value
b.TypeMetaApplyConfiguration.APIVersion = &value
return b
}
@ -103,7 +103,7 @@ func (b *LeaseApplyConfiguration) WithAPIVersion(value string) *LeaseApplyConfig
// If called multiple times, the Name field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithName(value string) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
b.ObjectMetaApplyConfiguration.Name = &value
return b
}
@ -112,7 +112,7 @@ func (b *LeaseApplyConfiguration) WithName(value string) *LeaseApplyConfiguratio
// If called multiple times, the GenerateName field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithGenerateName(value string) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
b.ObjectMetaApplyConfiguration.GenerateName = &value
return b
}
@ -121,7 +121,7 @@ func (b *LeaseApplyConfiguration) WithGenerateName(value string) *LeaseApplyConf
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithNamespace(value string) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
b.ObjectMetaApplyConfiguration.Namespace = &value
return b
}
@ -130,7 +130,7 @@ func (b *LeaseApplyConfiguration) WithNamespace(value string) *LeaseApplyConfigu
// If called multiple times, the UID field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithUID(value types.UID) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
b.ObjectMetaApplyConfiguration.UID = &value
return b
}
@ -139,7 +139,7 @@ func (b *LeaseApplyConfiguration) WithUID(value types.UID) *LeaseApplyConfigurat
// If called multiple times, the ResourceVersion field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithResourceVersion(value string) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
return b
}
@ -148,25 +148,25 @@ func (b *LeaseApplyConfiguration) WithResourceVersion(value string) *LeaseApplyC
// If called multiple times, the Generation field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithGeneration(value int64) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
b.ObjectMetaApplyConfiguration.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithCreationTimestamp(value metav1.Time) *LeaseApplyConfiguration {
func (b *LeaseApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *LeaseApplyConfiguration {
func (b *LeaseApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
return b
}
@ -175,7 +175,7 @@ func (b *LeaseApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Leas
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
return b
}
@ -185,11 +185,11 @@ func (b *LeaseApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *L
// overwriting an existing map entries in Labels field with the same key.
func (b *LeaseApplyConfiguration) WithLabels(entries map[string]string) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
b.ObjectMetaApplyConfiguration.Labels[k] = v
}
return b
}
@ -200,11 +200,11 @@ func (b *LeaseApplyConfiguration) WithLabels(entries map[string]string) *LeaseAp
// overwriting an existing map entries in Annotations field with the same key.
func (b *LeaseApplyConfiguration) WithAnnotations(entries map[string]string) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
b.ObjectMetaApplyConfiguration.Annotations[k] = v
}
return b
}
@ -212,13 +212,13 @@ func (b *LeaseApplyConfiguration) WithAnnotations(entries map[string]string) *Le
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (b *LeaseApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *LeaseApplyConfiguration {
func (b *LeaseApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
}
return b
}
@ -229,14 +229,14 @@ func (b *LeaseApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen
func (b *LeaseApplyConfiguration) WithFinalizers(values ...string) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
func (b *LeaseApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{}
}
}
@ -251,5 +251,5 @@ func (b *LeaseApplyConfiguration) WithSpec(value *LeaseSpecApplyConfiguration) *
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *LeaseApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.Name
return b.ObjectMetaApplyConfiguration.Name
}

View File

@ -20,7 +20,7 @@ package v1
import (
coordinationv1 "k8s.io/api/coordination/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// LeaseSpecApplyConfiguration represents a declarative configuration of the LeaseSpec type for use
@ -28,8 +28,8 @@ import (
type LeaseSpecApplyConfiguration struct {
HolderIdentity *string `json:"holderIdentity,omitempty"`
LeaseDurationSeconds *int32 `json:"leaseDurationSeconds,omitempty"`
AcquireTime *v1.MicroTime `json:"acquireTime,omitempty"`
RenewTime *v1.MicroTime `json:"renewTime,omitempty"`
AcquireTime *metav1.MicroTime `json:"acquireTime,omitempty"`
RenewTime *metav1.MicroTime `json:"renewTime,omitempty"`
LeaseTransitions *int32 `json:"leaseTransitions,omitempty"`
Strategy *coordinationv1.CoordinatedLeaseStrategy `json:"strategy,omitempty"`
PreferredHolder *string `json:"preferredHolder,omitempty"`
@ -60,7 +60,7 @@ func (b *LeaseSpecApplyConfiguration) WithLeaseDurationSeconds(value int32) *Lea
// WithAcquireTime sets the AcquireTime field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the AcquireTime field is set to the value of the last call.
func (b *LeaseSpecApplyConfiguration) WithAcquireTime(value v1.MicroTime) *LeaseSpecApplyConfiguration {
func (b *LeaseSpecApplyConfiguration) WithAcquireTime(value metav1.MicroTime) *LeaseSpecApplyConfiguration {
b.AcquireTime = &value
return b
}
@ -68,7 +68,7 @@ func (b *LeaseSpecApplyConfiguration) WithAcquireTime(value v1.MicroTime) *Lease
// WithRenewTime sets the RenewTime field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the RenewTime field is set to the value of the last call.
func (b *LeaseSpecApplyConfiguration) WithRenewTime(value v1.MicroTime) *LeaseSpecApplyConfiguration {
func (b *LeaseSpecApplyConfiguration) WithRenewTime(value metav1.MicroTime) *LeaseSpecApplyConfiguration {
b.RenewTime = &value
return b
}

View File

@ -16,10 +16,10 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
package v1alpha2
import (
coordinationv1alpha1 "k8s.io/api/coordination/v1alpha1"
coordinationv1alpha2 "k8s.io/api/coordination/v1alpha2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
@ -42,7 +42,7 @@ func LeaseCandidate(name, namespace string) *LeaseCandidateApplyConfiguration {
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("LeaseCandidate")
b.WithAPIVersion("coordination.k8s.io/v1alpha1")
b.WithAPIVersion("coordination.k8s.io/v1alpha2")
return b
}
@ -57,20 +57,20 @@ func LeaseCandidate(name, namespace string) *LeaseCandidateApplyConfiguration {
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental!
func ExtractLeaseCandidate(leaseCandidate *coordinationv1alpha1.LeaseCandidate, fieldManager string) (*LeaseCandidateApplyConfiguration, error) {
func ExtractLeaseCandidate(leaseCandidate *coordinationv1alpha2.LeaseCandidate, fieldManager string) (*LeaseCandidateApplyConfiguration, error) {
return extractLeaseCandidate(leaseCandidate, fieldManager, "")
}
// ExtractLeaseCandidateStatus is the same as ExtractLeaseCandidate except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractLeaseCandidateStatus(leaseCandidate *coordinationv1alpha1.LeaseCandidate, fieldManager string) (*LeaseCandidateApplyConfiguration, error) {
func ExtractLeaseCandidateStatus(leaseCandidate *coordinationv1alpha2.LeaseCandidate, fieldManager string) (*LeaseCandidateApplyConfiguration, error) {
return extractLeaseCandidate(leaseCandidate, fieldManager, "status")
}
func extractLeaseCandidate(leaseCandidate *coordinationv1alpha1.LeaseCandidate, fieldManager string, subresource string) (*LeaseCandidateApplyConfiguration, error) {
func extractLeaseCandidate(leaseCandidate *coordinationv1alpha2.LeaseCandidate, fieldManager string, subresource string) (*LeaseCandidateApplyConfiguration, error) {
b := &LeaseCandidateApplyConfiguration{}
err := managedfields.ExtractInto(leaseCandidate, internal.Parser().Type("io.k8s.api.coordination.v1alpha1.LeaseCandidate"), fieldManager, b, subresource)
err := managedfields.ExtractInto(leaseCandidate, internal.Parser().Type("io.k8s.api.coordination.v1alpha2.LeaseCandidate"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
@ -78,7 +78,7 @@ func extractLeaseCandidate(leaseCandidate *coordinationv1alpha1.LeaseCandidate,
b.WithNamespace(leaseCandidate.Namespace)
b.WithKind("LeaseCandidate")
b.WithAPIVersion("coordination.k8s.io/v1alpha1")
b.WithAPIVersion("coordination.k8s.io/v1alpha2")
return b, nil
}
@ -86,7 +86,7 @@ func extractLeaseCandidate(leaseCandidate *coordinationv1alpha1.LeaseCandidate,
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
func (b *LeaseCandidateApplyConfiguration) WithKind(value string) *LeaseCandidateApplyConfiguration {
b.Kind = &value
b.TypeMetaApplyConfiguration.Kind = &value
return b
}
@ -94,7 +94,7 @@ func (b *LeaseCandidateApplyConfiguration) WithKind(value string) *LeaseCandidat
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIVersion field is set to the value of the last call.
func (b *LeaseCandidateApplyConfiguration) WithAPIVersion(value string) *LeaseCandidateApplyConfiguration {
b.APIVersion = &value
b.TypeMetaApplyConfiguration.APIVersion = &value
return b
}
@ -103,7 +103,7 @@ func (b *LeaseCandidateApplyConfiguration) WithAPIVersion(value string) *LeaseCa
// If called multiple times, the Name field is set to the value of the last call.
func (b *LeaseCandidateApplyConfiguration) WithName(value string) *LeaseCandidateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
b.ObjectMetaApplyConfiguration.Name = &value
return b
}
@ -112,7 +112,7 @@ func (b *LeaseCandidateApplyConfiguration) WithName(value string) *LeaseCandidat
// If called multiple times, the GenerateName field is set to the value of the last call.
func (b *LeaseCandidateApplyConfiguration) WithGenerateName(value string) *LeaseCandidateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
b.ObjectMetaApplyConfiguration.GenerateName = &value
return b
}
@ -121,7 +121,7 @@ func (b *LeaseCandidateApplyConfiguration) WithGenerateName(value string) *Lease
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *LeaseCandidateApplyConfiguration) WithNamespace(value string) *LeaseCandidateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
b.ObjectMetaApplyConfiguration.Namespace = &value
return b
}
@ -130,7 +130,7 @@ func (b *LeaseCandidateApplyConfiguration) WithNamespace(value string) *LeaseCan
// If called multiple times, the UID field is set to the value of the last call.
func (b *LeaseCandidateApplyConfiguration) WithUID(value types.UID) *LeaseCandidateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
b.ObjectMetaApplyConfiguration.UID = &value
return b
}
@ -139,7 +139,7 @@ func (b *LeaseCandidateApplyConfiguration) WithUID(value types.UID) *LeaseCandid
// If called multiple times, the ResourceVersion field is set to the value of the last call.
func (b *LeaseCandidateApplyConfiguration) WithResourceVersion(value string) *LeaseCandidateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
return b
}
@ -148,7 +148,7 @@ func (b *LeaseCandidateApplyConfiguration) WithResourceVersion(value string) *Le
// If called multiple times, the Generation field is set to the value of the last call.
func (b *LeaseCandidateApplyConfiguration) WithGeneration(value int64) *LeaseCandidateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
b.ObjectMetaApplyConfiguration.Generation = &value
return b
}
@ -157,7 +157,7 @@ func (b *LeaseCandidateApplyConfiguration) WithGeneration(value int64) *LeaseCan
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (b *LeaseCandidateApplyConfiguration) WithCreationTimestamp(value metav1.Time) *LeaseCandidateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
return b
}
@ -166,7 +166,7 @@ func (b *LeaseCandidateApplyConfiguration) WithCreationTimestamp(value metav1.Ti
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (b *LeaseCandidateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *LeaseCandidateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
return b
}
@ -175,7 +175,7 @@ func (b *LeaseCandidateApplyConfiguration) WithDeletionTimestamp(value metav1.Ti
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *LeaseCandidateApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *LeaseCandidateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
return b
}
@ -185,11 +185,11 @@ func (b *LeaseCandidateApplyConfiguration) WithDeletionGracePeriodSeconds(value
// overwriting an existing map entries in Labels field with the same key.
func (b *LeaseCandidateApplyConfiguration) WithLabels(entries map[string]string) *LeaseCandidateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
b.ObjectMetaApplyConfiguration.Labels[k] = v
}
return b
}
@ -200,11 +200,11 @@ func (b *LeaseCandidateApplyConfiguration) WithLabels(entries map[string]string)
// overwriting an existing map entries in Annotations field with the same key.
func (b *LeaseCandidateApplyConfiguration) WithAnnotations(entries map[string]string) *LeaseCandidateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
b.ObjectMetaApplyConfiguration.Annotations[k] = v
}
return b
}
@ -218,7 +218,7 @@ func (b *LeaseCandidateApplyConfiguration) WithOwnerReferences(values ...*v1.Own
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
}
return b
}
@ -229,7 +229,7 @@ func (b *LeaseCandidateApplyConfiguration) WithOwnerReferences(values ...*v1.Own
func (b *LeaseCandidateApplyConfiguration) WithFinalizers(values ...string) *LeaseCandidateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
@ -251,5 +251,5 @@ func (b *LeaseCandidateApplyConfiguration) WithSpec(value *LeaseCandidateSpecApp
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *LeaseCandidateApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.Name
return b.ObjectMetaApplyConfiguration.Name
}

View File

@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
package v1alpha2
import (
coordinationv1 "k8s.io/api/coordination/v1"
@ -26,12 +26,12 @@ import (
// LeaseCandidateSpecApplyConfiguration represents a declarative configuration of the LeaseCandidateSpec type for use
// with apply.
type LeaseCandidateSpecApplyConfiguration struct {
LeaseName *string `json:"leaseName,omitempty"`
PingTime *v1.MicroTime `json:"pingTime,omitempty"`
RenewTime *v1.MicroTime `json:"renewTime,omitempty"`
BinaryVersion *string `json:"binaryVersion,omitempty"`
EmulationVersion *string `json:"emulationVersion,omitempty"`
PreferredStrategies []coordinationv1.CoordinatedLeaseStrategy `json:"preferredStrategies,omitempty"`
LeaseName *string `json:"leaseName,omitempty"`
PingTime *v1.MicroTime `json:"pingTime,omitempty"`
RenewTime *v1.MicroTime `json:"renewTime,omitempty"`
BinaryVersion *string `json:"binaryVersion,omitempty"`
EmulationVersion *string `json:"emulationVersion,omitempty"`
Strategy *coordinationv1.CoordinatedLeaseStrategy `json:"strategy,omitempty"`
}
// LeaseCandidateSpecApplyConfiguration constructs a declarative configuration of the LeaseCandidateSpec type for use with
@ -80,12 +80,10 @@ func (b *LeaseCandidateSpecApplyConfiguration) WithEmulationVersion(value string
return b
}
// WithPreferredStrategies adds the given value to the PreferredStrategies field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the PreferredStrategies field.
func (b *LeaseCandidateSpecApplyConfiguration) WithPreferredStrategies(values ...coordinationv1.CoordinatedLeaseStrategy) *LeaseCandidateSpecApplyConfiguration {
for i := range values {
b.PreferredStrategies = append(b.PreferredStrategies, values[i])
}
// WithStrategy sets the Strategy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Strategy field is set to the value of the last call.
func (b *LeaseCandidateSpecApplyConfiguration) WithStrategy(value coordinationv1.CoordinatedLeaseStrategy) *LeaseCandidateSpecApplyConfiguration {
b.Strategy = &value
return b
}

View File

@ -86,7 +86,7 @@ func extractLease(lease *coordinationv1beta1.Lease, fieldManager string, subreso
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithKind(value string) *LeaseApplyConfiguration {
b.Kind = &value
b.TypeMetaApplyConfiguration.Kind = &value
return b
}
@ -94,7 +94,7 @@ func (b *LeaseApplyConfiguration) WithKind(value string) *LeaseApplyConfiguratio
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIVersion field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithAPIVersion(value string) *LeaseApplyConfiguration {
b.APIVersion = &value
b.TypeMetaApplyConfiguration.APIVersion = &value
return b
}
@ -103,7 +103,7 @@ func (b *LeaseApplyConfiguration) WithAPIVersion(value string) *LeaseApplyConfig
// If called multiple times, the Name field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithName(value string) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
b.ObjectMetaApplyConfiguration.Name = &value
return b
}
@ -112,7 +112,7 @@ func (b *LeaseApplyConfiguration) WithName(value string) *LeaseApplyConfiguratio
// If called multiple times, the GenerateName field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithGenerateName(value string) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
b.ObjectMetaApplyConfiguration.GenerateName = &value
return b
}
@ -121,7 +121,7 @@ func (b *LeaseApplyConfiguration) WithGenerateName(value string) *LeaseApplyConf
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithNamespace(value string) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
b.ObjectMetaApplyConfiguration.Namespace = &value
return b
}
@ -130,7 +130,7 @@ func (b *LeaseApplyConfiguration) WithNamespace(value string) *LeaseApplyConfigu
// If called multiple times, the UID field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithUID(value types.UID) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
b.ObjectMetaApplyConfiguration.UID = &value
return b
}
@ -139,7 +139,7 @@ func (b *LeaseApplyConfiguration) WithUID(value types.UID) *LeaseApplyConfigurat
// If called multiple times, the ResourceVersion field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithResourceVersion(value string) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
return b
}
@ -148,7 +148,7 @@ func (b *LeaseApplyConfiguration) WithResourceVersion(value string) *LeaseApplyC
// If called multiple times, the Generation field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithGeneration(value int64) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
b.ObjectMetaApplyConfiguration.Generation = &value
return b
}
@ -157,7 +157,7 @@ func (b *LeaseApplyConfiguration) WithGeneration(value int64) *LeaseApplyConfigu
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithCreationTimestamp(value metav1.Time) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
return b
}
@ -166,7 +166,7 @@ func (b *LeaseApplyConfiguration) WithCreationTimestamp(value metav1.Time) *Leas
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
return b
}
@ -175,7 +175,7 @@ func (b *LeaseApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Leas
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *LeaseApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
return b
}
@ -185,11 +185,11 @@ func (b *LeaseApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *L
// overwriting an existing map entries in Labels field with the same key.
func (b *LeaseApplyConfiguration) WithLabels(entries map[string]string) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
b.ObjectMetaApplyConfiguration.Labels[k] = v
}
return b
}
@ -200,11 +200,11 @@ func (b *LeaseApplyConfiguration) WithLabels(entries map[string]string) *LeaseAp
// overwriting an existing map entries in Annotations field with the same key.
func (b *LeaseApplyConfiguration) WithAnnotations(entries map[string]string) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
b.ObjectMetaApplyConfiguration.Annotations[k] = v
}
return b
}
@ -218,7 +218,7 @@ func (b *LeaseApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
}
return b
}
@ -229,7 +229,7 @@ func (b *LeaseApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen
func (b *LeaseApplyConfiguration) WithFinalizers(values ...string) *LeaseApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
@ -251,5 +251,5 @@ func (b *LeaseApplyConfiguration) WithSpec(value *LeaseSpecApplyConfiguration) *
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *LeaseApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.Name
return b.ObjectMetaApplyConfiguration.Name
}