From a7f430b8bb75cf747223b573903838f48c0a3622 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 13 Jun 2024 17:25:39 +0200 Subject: [PATCH] DRA: remove immediate allocation As agreed in https://github.com/kubernetes/enhancements/pull/4709, immediate allocation is one of those features which can be removed because it makes no sense for structured parameters and the justification for classic DRA is weak. Kubernetes-commit: de5742ae83c8d77268a7caf5f3b1f418c4a13a84 --- applyconfigurations/internal/internal.go | 3 --- .../resource/v1alpha3/resourceclaimspec.go | 13 ------------- 2 files changed, 16 deletions(-) diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index 0a9b23bb..56536c2b 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -12419,9 +12419,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: io.k8s.api.resource.v1alpha3.ResourceClaimSpec map: fields: - - name: allocationMode - type: - scalar: string - name: parametersRef type: namedType: io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference diff --git a/applyconfigurations/resource/v1alpha3/resourceclaimspec.go b/applyconfigurations/resource/v1alpha3/resourceclaimspec.go index ea650368..38bd0c55 100644 --- a/applyconfigurations/resource/v1alpha3/resourceclaimspec.go +++ b/applyconfigurations/resource/v1alpha3/resourceclaimspec.go @@ -18,16 +18,11 @@ limitations under the License. package v1alpha3 -import ( - resourcev1alpha3 "k8s.io/api/resource/v1alpha3" -) - // ResourceClaimSpecApplyConfiguration represents a declarative configuration of the ResourceClaimSpec type for use // with apply. type ResourceClaimSpecApplyConfiguration struct { ResourceClassName *string `json:"resourceClassName,omitempty"` ParametersRef *ResourceClaimParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"` - AllocationMode *resourcev1alpha3.AllocationMode `json:"allocationMode,omitempty"` } // ResourceClaimSpecApplyConfiguration constructs a declarative configuration of the ResourceClaimSpec type for use with @@ -51,11 +46,3 @@ func (b *ResourceClaimSpecApplyConfiguration) WithParametersRef(value *ResourceC b.ParametersRef = value return b } - -// WithAllocationMode sets the AllocationMode 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 AllocationMode field is set to the value of the last call. -func (b *ResourceClaimSpecApplyConfiguration) WithAllocationMode(value resourcev1alpha3.AllocationMode) *ResourceClaimSpecApplyConfiguration { - b.AllocationMode = &value - return b -}