From e0bc24e153d55d6f019f5241fbff5cc559bbda73 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 13 Jun 2024 18:43:17 +0200 Subject: [PATCH] DRA: remove "sharable" from claim allocation result Now all claims are shareable up to the limit imposed by the size of the "reserverFor" array. This is one of the agreed simplifications for 1.31. Kubernetes-commit: 8a629b9f150c1042e2918043e6012a4f22742b19 --- applyconfigurations/internal/internal.go | 6 ------ .../resource/v1alpha3/allocationresult.go | 9 --------- .../resource/v1alpha3/resourceclaimparameters.go | 9 --------- 3 files changed, 24 deletions(-) diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index 56536c2b..36dd3698 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -12166,9 +12166,6 @@ var schemaYAML = typed.YAMLObject(`types: elementType: namedType: io.k8s.api.resource.v1alpha3.ResourceHandle elementRelationship: atomic - - name: shareable - type: - scalar: boolean - name: io.k8s.api.resource.v1alpha3.DriverAllocationResult map: fields: @@ -12387,9 +12384,6 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta default: {} - - name: shareable - type: - scalar: boolean - name: io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference map: fields: diff --git a/applyconfigurations/resource/v1alpha3/allocationresult.go b/applyconfigurations/resource/v1alpha3/allocationresult.go index cf3cde94..e6d1df86 100644 --- a/applyconfigurations/resource/v1alpha3/allocationresult.go +++ b/applyconfigurations/resource/v1alpha3/allocationresult.go @@ -27,7 +27,6 @@ import ( type AllocationResultApplyConfiguration struct { ResourceHandles []ResourceHandleApplyConfiguration `json:"resourceHandles,omitempty"` AvailableOnNodes *v1.NodeSelectorApplyConfiguration `json:"availableOnNodes,omitempty"` - Shareable *bool `json:"shareable,omitempty"` } // AllocationResultApplyConfiguration constructs a declarative configuration of the AllocationResult type for use with @@ -56,11 +55,3 @@ func (b *AllocationResultApplyConfiguration) WithAvailableOnNodes(value *v1.Node b.AvailableOnNodes = value return b } - -// WithShareable sets the Shareable 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 Shareable field is set to the value of the last call. -func (b *AllocationResultApplyConfiguration) WithShareable(value bool) *AllocationResultApplyConfiguration { - b.Shareable = &value - return b -} diff --git a/applyconfigurations/resource/v1alpha3/resourceclaimparameters.go b/applyconfigurations/resource/v1alpha3/resourceclaimparameters.go index ef29f99b..fe00f1da 100644 --- a/applyconfigurations/resource/v1alpha3/resourceclaimparameters.go +++ b/applyconfigurations/resource/v1alpha3/resourceclaimparameters.go @@ -33,7 +33,6 @@ type ResourceClaimParametersApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` GeneratedFrom *ResourceClaimParametersReferenceApplyConfiguration `json:"generatedFrom,omitempty"` - Shareable *bool `json:"shareable,omitempty"` DriverRequests []DriverRequestsApplyConfiguration `json:"driverRequests,omitempty"` } @@ -250,14 +249,6 @@ func (b *ResourceClaimParametersApplyConfiguration) WithGeneratedFrom(value *Res return b } -// WithShareable sets the Shareable 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 Shareable field is set to the value of the last call. -func (b *ResourceClaimParametersApplyConfiguration) WithShareable(value bool) *ResourceClaimParametersApplyConfiguration { - b.Shareable = &value - return b -} - // WithDriverRequests adds the given value to the DriverRequests 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 DriverRequests field.