updated vendor
This commit is contained in:
+31
-4
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
resourcev1 "k8s.io/api/resource/v1"
|
||||
corev1 "k8s.io/client-go/applyconfigurations/core/v1"
|
||||
)
|
||||
@@ -74,7 +75,7 @@ type DeviceApplyConfiguration struct {
|
||||
// any device in a ResourceSlice, then the maximum number of
|
||||
// allowed devices per ResourceSlice is 64 instead of 128.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// This is a beta field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
Taints []DeviceTaintApplyConfiguration `json:"taints,omitempty"`
|
||||
// BindsToNode indicates if the usage of an allocation involving this device
|
||||
@@ -82,7 +83,7 @@ type DeviceApplyConfiguration struct {
|
||||
// If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector
|
||||
// to match the node where the allocation was made.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
|
||||
// This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
|
||||
// feature gates.
|
||||
BindsToNode *bool `json:"bindsToNode,omitempty"`
|
||||
// BindingConditions defines the conditions for proceeding with binding.
|
||||
@@ -94,7 +95,7 @@ type DeviceApplyConfiguration struct {
|
||||
//
|
||||
// The conditions must be a valid condition type string.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
|
||||
// This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
|
||||
// feature gates.
|
||||
BindingConditions []string `json:"bindingConditions,omitempty"`
|
||||
// BindingFailureConditions defines the conditions for binding failure.
|
||||
@@ -105,7 +106,7 @@ type DeviceApplyConfiguration struct {
|
||||
//
|
||||
// The conditions must be a valid condition type string.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
|
||||
// This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
|
||||
// feature gates.
|
||||
BindingFailureConditions []string `json:"bindingFailureConditions,omitempty"`
|
||||
// AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests.
|
||||
@@ -113,6 +114,18 @@ type DeviceApplyConfiguration struct {
|
||||
// If AllowMultipleAllocations is set to true, the device can be allocated more than once,
|
||||
// and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not.
|
||||
AllowMultipleAllocations *bool `json:"allowMultipleAllocations,omitempty"`
|
||||
// NodeAllocatableResourceMappings defines the mapping of node resources
|
||||
// that are managed by the DRA driver exposing this device. This includes resources currently
|
||||
// reported in v1.Node `status.allocatable` that are not extended resources
|
||||
// (see https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#extended-resources).
|
||||
// Examples include "cpu", "memory", "ephemeral-storage", and hugepages.
|
||||
// In addition to standard requests made through the Pod `spec`, these resources
|
||||
// can also be requested through claims and allocated by the DRA driver.
|
||||
// For example, a CPU DRA driver might allocate exclusive CPUs or auxiliary node memory
|
||||
// dependencies of an accelerator device.
|
||||
// The keys of this map are the node-allocatable resource names (e.g., "cpu", "memory").
|
||||
// Extended resource names are not permitted as keys.
|
||||
NodeAllocatableResourceMappings map[apicorev1.ResourceName]NodeAllocatableResourceMappingApplyConfiguration `json:"nodeAllocatableResourceMappings,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceApplyConfiguration constructs a declarative configuration of the Device type for use with
|
||||
@@ -242,3 +255,17 @@ func (b *DeviceApplyConfiguration) WithAllowMultipleAllocations(value bool) *Dev
|
||||
b.AllowMultipleAllocations = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNodeAllocatableResourceMappings puts the entries into the NodeAllocatableResourceMappings field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the NodeAllocatableResourceMappings field,
|
||||
// overwriting an existing map entries in NodeAllocatableResourceMappings field with the same key.
|
||||
func (b *DeviceApplyConfiguration) WithNodeAllocatableResourceMappings(entries map[apicorev1.ResourceName]NodeAllocatableResourceMappingApplyConfiguration) *DeviceApplyConfiguration {
|
||||
if b.NodeAllocatableResourceMappings == nil && len(entries) > 0 {
|
||||
b.NodeAllocatableResourceMappings = make(map[apicorev1.ResourceName]NodeAllocatableResourceMappingApplyConfiguration, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.NodeAllocatableResourceMappings[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user