package v1

import "k8s.io/api/resource/v1"

Package v1 is the v1 version of the resource API.

Index

Constants

const (
	// Finalizer is the finalizer that gets set for claims
	// which were allocated through a builtin controller.
	// Reserved for use by Kubernetes, DRA driver controllers must
	// use their own finalizer.
	Finalizer = "resource.kubernetes.io/delete-protection"
	// ExtendedResourceClaimAnnotation is the annotation applied on the generated
	// special ResourceClaim. Its single valid value is "true".
	// This is used only inside the scheduler.
	ExtendedResourceClaimAnnotation = "resource.kubernetes.io/extended-resource-claim"
	// PodResourceClaimAnnotation is the annotation set on template-generated
	// ResourceClaims by the ResourceClaim controller. Its value is the
	// pod.spec.resourceClaims[].name for which the claim was generated.
	PodResourceClaimAnnotation = "resource.kubernetes.io/pod-claim-name"
	// Resource device class prefix is for generating implicit extended resource
	// name for a device class when its ExtendedResourceName field is not
	// specified. The generated name is this prefix + the device class name.
	// The generated name may not be a valid extended resource name for use
	// in pod.Spec.Resources.Requests, in that case, a valid name has to be specified
	// explicitly in device class.
	ResourceDeviceClassPrefix string = "deviceclass.resource.kubernetes.io/"
)
const (
	// ResourceSliceSelectorNodeName can be used in a [metav1.ListOptions]
	// field selector to filter based on [ResourceSliceSpec.NodeName].
	ResourceSliceSelectorNodeName = "spec.nodeName"
	// ResourceSliceSelectorDriver can be used in a [metav1.ListOptions]
	// field selector to filter based on [ResourceSliceSpec.Driver].
	ResourceSliceSelectorDriver = "spec.driver"
)
const (
	DeviceRequestsMaxSize    = AllocationResultsMaxSize
	DeviceConstraintsMaxSize = 32
	DeviceConfigMaxSize      = 32
)
const (
	DeviceSelectorsMaxSize             = 32
	FirstAvailableDeviceRequestMaxSize = 8
	DeviceTolerationsMaxLength         = 16
)
const (
	DeviceAllocationModeExactCount = DeviceAllocationMode("ExactCount")
	DeviceAllocationModeAll        = DeviceAllocationMode("All")
)

Valid [DeviceRequest.CountMode] values.

const (
	// AllocatedDeviceStatusMaxConditions represents the maximum number of
	// conditions in a device status.
	AllocatedDeviceStatusMaxConditions int = 8
	// AllocatedDeviceStatusDataMaxLength represents the maximum length of the
	// raw data in the Data field in a device status.
	AllocatedDeviceStatusDataMaxLength int = 10 * 1024
	// NetworkDeviceDataMaxIPs represents the maximum number of IPs in the networkData
	// field in a device status.
	NetworkDeviceDataMaxIPs int = 16
	// NetworkDeviceDataInterfaceNameMaxLength represents the maximum number of characters
	// for the networkData.interfaceName field in a device status.
	NetworkDeviceDataInterfaceNameMaxLength int = 256
	// NetworkDeviceDataHardwareAddressMaxLength represents the maximum number of characters
	// for the networkData.hardwareAddress field in a device status.
	NetworkDeviceDataHardwareAddressMaxLength int = 128
)
const AllocationResultsMaxSize = 32

AllocationResultsMaxSize represents the maximum number of entries in allocation.devices.results.

const BindingConditionsMaxSize = 4
const BindingFailureConditionsMaxSize = 4
const CELSelectorExpressionMaxCost = 1000000

CELSelectorExpressionMaxCost specifies the cost limit for a single CEL selector evaluation.

There is no overall budget for selecting a device, so the actual time required for that is proportional to the number of CEL selectors and how often they need to be evaluated, which can vary depending on several factors (number of devices, cluster utilization, additional constraints).

Validation against this limit and CELSelectorExpressionMaxLength happens only when setting an expression for the first time or when changing it. If the limits are changed in a future Kubernetes release, existing users are guaranteed that existing expressions will continue to be valid.

However, the kube-scheduler also applies this cost limit at runtime, so it could happen that a valid expression fails at runtime after an up- or downgrade. This can also happen without version skew when the cost estimate underestimated the actual cost. That this might happen is the reason why kube-scheduler enforces the runtime limit instead of relying on validation.

According to https://github.com/kubernetes/kubernetes/blob/4aeaf1e99e82da8334c0d6dddd848a194cd44b4f/staging/src/k8s.io/apiserver/pkg/apis/cel/config.go#L20-L22, this gives roughly 0.1 second for each expression evaluation. However, this depends on how fast the machine is.

const CELSelectorExpressionMaxLength = 10 * 1024

CELSelectorExpressionMaxLength is the maximum length of a CEL selector expression string.

const (
	DRAAdminNamespaceLabelKey = "resource.kubernetes.io/admin-access"
)

DRAAdminNamespaceLabelKey is a label key used to grant administrative access to certain resource.k8s.io API types within a namespace. When this label is set on a namespace with the value "true" (case-sensitive), it allows the use of adminAccess: true in any namespaced resource.k8s.io API types. Currently, this permission applies to ResourceClaim and ResourceClaimTemplate objects.

const DeviceAttributeMaxValueLength = 64

DeviceAttributeMaxValueLength is the maximum length of a string or version attribute value.

const DeviceMaxDomainLength = 63

DeviceMaxDomainLength is the maximum length of the domain prefix in a fully-qualified name.

const DeviceMaxIDLength = 32

DeviceMaxIDLength is the maximum length of the identifier in a device attribute or capacity name (`<domain>/<ID>`).

const DeviceTaintsMaxLength = 16

DeviceTaintsMaxLength is the maximum number of taints per Device.

const DriverNameMaxLength = 63

DriverNameMaxLength is the maximum valid length of a driver name in the ResourceSliceSpec and other places. It's the same as for CSI driver names.

const GroupName = "resource.k8s.io"

GroupName is the group name use in this package

const OpaqueParametersMaxLength = 10 * 1024

OpaqueParametersMaxLength is the maximum length of the raw data in an [OpaqueDeviceConfiguration.Parameters] field.

const PoolNameMaxLength = validation.DNS1123SubdomainMaxLength // Same as for a single node name.
const ResourceClaimReservedForMaxSize = 256

ResourceClaimReservedForMaxSize is the maximum number of entries in claim.status.reservedFor.

const ResourceSliceMaxAttributesAndCapacitiesPerDevice = 32

Limit for the sum of the number of entries in both attributes and capacity.

const ResourceSliceMaxCounterSets = 8

Defines the maximum number of counter sets (through the SharedCounters field) that can be defined in a ResourceSlice.

const ResourceSliceMaxCountersPerCounterSet = 32

Defines the maximum number of counters that can be defined in a counter set.

const ResourceSliceMaxCountersPerDeviceCounterConsumption = 32

Defines the maximum number of counters that can be defined per device counter consumption.

const ResourceSliceMaxDeviceCounterConsumptionsPerDevice = 2

Defines the maximum number of device counter consumptions (through the ConsumesCounters field) that can be defined per device.

const ResourceSliceMaxDevices = 128
const ResourceSliceMaxDevicesWithTaintsOrConsumesCounters = 64
const ResourceSliceMaxSharedCapacity = 128

Variables

var (
	ErrInvalidLengthGenerated        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenerated          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
)
var (
	// We only register manually written functions here. The registration of the
	// generated functions takes place in the generated files. The separation
	// makes the code compile even when the generated files are missing.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AllocatedDeviceStatus

type AllocatedDeviceStatus struct {
	// Driver specifies the name of the DRA driver whose kubelet
	// plugin should be invoked to process the allocation once the claim is
	// needed on a node.
	//
	// Must be a DNS subdomain and should end with a DNS domain owned by the
	// vendor of the driver. It should use only lower case characters.
	//
	// +required
	Driver string `json:"driver" protobuf:"bytes,1,rep,name=driver"`

	// This name together with the driver name and the device name field
	// identify which device was allocated (`<driver name>/<pool name>/<device name>`).
	//
	// Must not be longer than 253 characters and may contain one or more
	// DNS sub-domains separated by slashes.
	//
	// +required
	Pool string `json:"pool" protobuf:"bytes,2,rep,name=pool"`

	// Device references one device instance via its name in the driver's
	// resource pool. It must be a DNS label.
	//
	// +required
	Device string `json:"device" protobuf:"bytes,3,rep,name=device"`

	// ShareID uniquely identifies an individual allocation share of the device.
	//
	// +optional
	// +featureGate=DRAConsumableCapacity
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:format=k8s-uuid
	ShareID *string `json:"shareID,omitempty" protobuf:"bytes,7,opt,name=shareID"`

	// Conditions contains the latest observation of the device's state.
	// If the device has been configured according to the class and claim
	// config references, the `Ready` condition should be True.
	//
	// Must not contain more than 8 entries.
	//
	// +optional
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions" protobuf:"bytes,4,opt,name=conditions"`

	// Data contains arbitrary driver-specific data.
	//
	// The length of the raw data must be smaller or equal to 10 Ki.
	//
	// +optional
	Data *runtime.RawExtension `json:"data,omitempty" protobuf:"bytes,5,opt,name=data"`

	// NetworkData contains network-related information specific to the device.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	NetworkData *NetworkDeviceData `json:"networkData,omitempty" protobuf:"bytes,6,opt,name=networkData"`
}

AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.

The combination of Driver, Pool, Device, and ShareID must match the corresponding key in Status.Allocation.Devices.

func (*AllocatedDeviceStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocatedDeviceStatus.

func (*AllocatedDeviceStatus) DeepCopyInto

func (in *AllocatedDeviceStatus) DeepCopyInto(out *AllocatedDeviceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AllocatedDeviceStatus) Marshal

func (m *AllocatedDeviceStatus) Marshal() (dAtA []byte, err error)

func (*AllocatedDeviceStatus) MarshalTo

func (m *AllocatedDeviceStatus) MarshalTo(dAtA []byte) (int, error)

func (*AllocatedDeviceStatus) MarshalToSizedBuffer

func (m *AllocatedDeviceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (AllocatedDeviceStatus) OpenAPIModelName

func (in AllocatedDeviceStatus) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*AllocatedDeviceStatus) Reset

func (m *AllocatedDeviceStatus) Reset()

func (*AllocatedDeviceStatus) Size

func (m *AllocatedDeviceStatus) Size() (n int)

func (*AllocatedDeviceStatus) String

func (this *AllocatedDeviceStatus) String() string

func (AllocatedDeviceStatus) SwaggerDoc

func (AllocatedDeviceStatus) SwaggerDoc() map[string]string

func (*AllocatedDeviceStatus) Unmarshal

func (m *AllocatedDeviceStatus) Unmarshal(dAtA []byte) error

type AllocationConfigSource

type AllocationConfigSource string

+enum +k8s:alpha(since: "1.36")=+k8s:enum

const (
	AllocationConfigSourceClass AllocationConfigSource = "FromClass"
	AllocationConfigSourceClaim AllocationConfigSource = "FromClaim"
)

Valid [DeviceAllocationConfiguration.Source] values.

type AllocationResult

type AllocationResult struct {
	// Devices is the result of allocating devices.
	//
	// +optional
	Devices DeviceAllocationResult `json:"devices,omitempty" protobuf:"bytes,1,opt,name=devices"`

	// NodeSelector defines where the allocated resources are available. If
	// unset, they are available everywhere.
	//
	// +optional
	NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,3,opt,name=nodeSelector"`

	// AllocationTimestamp stores the time when the resources were allocated.
	// This field is not guaranteed to be set, in which case that time is unknown.
	//
	// This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
	// feature gate.
	//
	// +optional
	// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
	AllocationTimestamp *metav1.Time `json:"allocationTimestamp,omitempty" protobuf:"bytes,5,opt,name=allocationTimestamp"`
}

AllocationResult contains attributes of an allocated resource.

func (*AllocationResult) DeepCopy

func (in *AllocationResult) DeepCopy() *AllocationResult

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationResult.

func (*AllocationResult) DeepCopyInto

func (in *AllocationResult) DeepCopyInto(out *AllocationResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AllocationResult) Marshal

func (m *AllocationResult) Marshal() (dAtA []byte, err error)

func (*AllocationResult) MarshalTo

func (m *AllocationResult) MarshalTo(dAtA []byte) (int, error)

func (*AllocationResult) MarshalToSizedBuffer

func (m *AllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (AllocationResult) OpenAPIModelName

func (in AllocationResult) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*AllocationResult) Reset

func (m *AllocationResult) Reset()

func (*AllocationResult) Size

func (m *AllocationResult) Size() (n int)

func (*AllocationResult) String

func (this *AllocationResult) String() string

func (AllocationResult) SwaggerDoc

func (AllocationResult) SwaggerDoc() map[string]string

func (*AllocationResult) Unmarshal

func (m *AllocationResult) Unmarshal(dAtA []byte) error

type CELDeviceSelector

type CELDeviceSelector struct {
	// Expression is a CEL expression which evaluates a single device. It
	// must evaluate to true when the device under consideration satisfies
	// the desired criteria, and false when it does not. Any other result
	// is an error and causes allocation of devices to abort.
	//
	// The expression's input is an object named "device", which carries
	// the following properties:
	//  - driver (string): the name of the driver which defines this device.
	//  - attributes (map[string]object): the device's attributes, grouped by prefix
	//    (e.g. device.attributes["dra.example.com"] evaluates to an object with all
	//    of the attributes which were prefixed by "dra.example.com".
	//  - capacity (map[string]object): the device's capacities, grouped by prefix.
	//  - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device
	//    (v1.34+ with the DRAConsumableCapacity feature enabled).
	//
	// Example: Consider a device with driver="dra.example.com", which exposes
	// two attributes named "model" and "ext.example.com/family" and which
	// exposes one capacity named "modules". This input to this expression
	// would have the following fields:
	//
	//     device.driver
	//     device.attributes["dra.example.com"].model
	//     device.attributes["ext.example.com"].family
	//     device.capacity["dra.example.com"].modules
	//
	// The device.driver field can be used to check for a specific driver,
	// either as a high-level precondition (i.e. you only want to consider
	// devices from this driver) or as part of a multi-clause expression
	// that is meant to consider devices from different drivers.
	//
	// The value type of each attribute is defined by the device
	// definition, and users who write these expressions must consult the
	// documentation for their specific drivers. The value type of each
	// capacity is Quantity.
	//
	// If an unknown prefix is used as a lookup in either device.attributes
	// or device.capacity, an empty map will be returned. Any reference to
	// an unknown field will cause an evaluation error and allocation to
	// abort.
	//
	// A robust expression should check for the existence of attributes
	// before referencing them.
	//
	// For ease of use, the cel.bind() function is enabled, and can be used
	// to simplify expressions that access multiple attributes with the
	// same domain. For example:
	//
	//     cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool)
	//
	// The length of the expression must be smaller or equal to 10 Ki. The
	// cost of evaluating it is also limited based on the estimated number
	// of logical steps.
	//
	// +required
	Expression string `json:"expression" protobuf:"bytes,1,name=expression"`
}

CELDeviceSelector contains a CEL expression for selecting a device.

func (*CELDeviceSelector) DeepCopy

func (in *CELDeviceSelector) DeepCopy() *CELDeviceSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CELDeviceSelector.

func (*CELDeviceSelector) DeepCopyInto

func (in *CELDeviceSelector) DeepCopyInto(out *CELDeviceSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CELDeviceSelector) Marshal

func (m *CELDeviceSelector) Marshal() (dAtA []byte, err error)

func (*CELDeviceSelector) MarshalTo

func (m *CELDeviceSelector) MarshalTo(dAtA []byte) (int, error)

func (*CELDeviceSelector) MarshalToSizedBuffer

func (m *CELDeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (CELDeviceSelector) OpenAPIModelName

func (in CELDeviceSelector) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*CELDeviceSelector) Reset

func (m *CELDeviceSelector) Reset()

func (*CELDeviceSelector) Size

func (m *CELDeviceSelector) Size() (n int)

func (*CELDeviceSelector) String

func (this *CELDeviceSelector) String() string

func (CELDeviceSelector) SwaggerDoc

func (CELDeviceSelector) SwaggerDoc() map[string]string

func (*CELDeviceSelector) Unmarshal

func (m *CELDeviceSelector) Unmarshal(dAtA []byte) error

type CapacityRequestPolicy

type CapacityRequestPolicy struct {
	// Default specifies how much of this capacity is consumed by a request
	// that does not contain an entry for it in DeviceRequest's Capacity.
	//
	// +optional
	Default *resource.Quantity `json:"default" protobuf:"bytes,1,opt,name=default"`

	// ValidValues defines a set of acceptable quantity values in consuming requests.
	//
	// Must not contain more than 10 entries.
	// Must be sorted in ascending order.
	//
	// If this field is set,
	// Default must be defined and it must be included in ValidValues list.
	//
	// If the requested amount does not match any valid value but smaller than some valid values,
	// the scheduler calculates the smallest valid value that is greater than or equal to the request.
	// That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues).
	//
	// If the requested amount exceeds all valid values, the request violates the policy,
	// and this device cannot be allocated.
	//
	// +optional
	// +listType=atomic
	// +oneOf=ValidRequestValues
	ValidValues []resource.Quantity `json:"validValues,omitempty" protobuf:"bytes,3,opt,name=validValues"`

	// ValidRange defines an acceptable quantity value range in consuming requests.
	//
	// If this field is set,
	// Default must be defined and it must fall within the defined ValidRange.
	//
	// If the requested amount does not fall within the defined range, the request violates the policy,
	// and this device cannot be allocated.
	//
	// If the request doesn't contain this capacity entry, Default value is used.
	//
	// +optional
	// +oneOf=ValidRequestValues
	ValidRange *CapacityRequestPolicyRange `json:"validRange,omitempty" protobuf:"bytes,4,opt,name=validRange"`
}

CapacityRequestPolicy defines how requests consume device capacity.

Must not set more than one ValidRequestValues.

func (*CapacityRequestPolicy) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapacityRequestPolicy.

func (*CapacityRequestPolicy) DeepCopyInto

func (in *CapacityRequestPolicy) DeepCopyInto(out *CapacityRequestPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CapacityRequestPolicy) Marshal

func (m *CapacityRequestPolicy) Marshal() (dAtA []byte, err error)

func (*CapacityRequestPolicy) MarshalTo

func (m *CapacityRequestPolicy) MarshalTo(dAtA []byte) (int, error)

func (*CapacityRequestPolicy) MarshalToSizedBuffer

func (m *CapacityRequestPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (CapacityRequestPolicy) OpenAPIModelName

func (in CapacityRequestPolicy) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*CapacityRequestPolicy) Reset

func (m *CapacityRequestPolicy) Reset()

func (*CapacityRequestPolicy) Size

func (m *CapacityRequestPolicy) Size() (n int)

func (*CapacityRequestPolicy) String

func (this *CapacityRequestPolicy) String() string

func (CapacityRequestPolicy) SwaggerDoc

func (CapacityRequestPolicy) SwaggerDoc() map[string]string

func (*CapacityRequestPolicy) Unmarshal

func (m *CapacityRequestPolicy) Unmarshal(dAtA []byte) error

type CapacityRequestPolicyRange

type CapacityRequestPolicyRange struct {
	// Min specifies the minimum capacity allowed for a consumption request.
	//
	// Min must be greater than or equal to zero,
	// and less than or equal to the capacity value.
	// requestPolicy.default must be more than or equal to the minimum.
	//
	// +required
	Min *resource.Quantity `json:"min,omitempty" protobuf:"bytes,1,opt,name=min"`

	// Max defines the upper limit for capacity that can be requested.
	//
	// Max must be less than or equal to the capacity value.
	// Min and requestPolicy.default must be less than or equal to the maximum.
	//
	// +optional
	Max *resource.Quantity `json:"max,omitempty" protobuf:"bytes,2,opt,name=max"`

	// Step defines the step size between valid capacity amounts within the range.
	//
	// Max (if set) and requestPolicy.default must be a multiple of Step.
	// Min + Step must be less than or equal to the capacity value.
	//
	// +optional
	Step *resource.Quantity `json:"step,omitempty" protobuf:"bytes,3,opt,name=step"`
}

CapacityRequestPolicyRange defines a valid range for consumable capacity values.

func (*CapacityRequestPolicyRange) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapacityRequestPolicyRange.

func (*CapacityRequestPolicyRange) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CapacityRequestPolicyRange) Marshal

func (m *CapacityRequestPolicyRange) Marshal() (dAtA []byte, err error)

func (*CapacityRequestPolicyRange) MarshalTo

func (m *CapacityRequestPolicyRange) MarshalTo(dAtA []byte) (int, error)

func (*CapacityRequestPolicyRange) MarshalToSizedBuffer

func (m *CapacityRequestPolicyRange) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (CapacityRequestPolicyRange) OpenAPIModelName

func (in CapacityRequestPolicyRange) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*CapacityRequestPolicyRange) Reset

func (m *CapacityRequestPolicyRange) Reset()

func (*CapacityRequestPolicyRange) Size

func (m *CapacityRequestPolicyRange) Size() (n int)

func (*CapacityRequestPolicyRange) String

func (this *CapacityRequestPolicyRange) String() string

func (CapacityRequestPolicyRange) SwaggerDoc

func (CapacityRequestPolicyRange) SwaggerDoc() map[string]string

func (*CapacityRequestPolicyRange) Unmarshal

func (m *CapacityRequestPolicyRange) Unmarshal(dAtA []byte) error

type CapacityRequirements

type CapacityRequirements struct {
	// Requests represent individual device resource requests for distinct resources,
	// all of which must be provided by the device.
	//
	// This value is used as an additional filtering condition against the available capacity on the device.
	// This is semantically equivalent to a CEL selector with
	// `device.capacity[<domain>].<name>.compareTo(quantity(<request quantity>)) >= 0`.
	// For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0.
	//
	// When a requestPolicy is defined, the requested amount is adjusted upward
	// to the nearest valid value based on the policy.
	// If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows—
	// the device is considered ineligible for allocation.
	//
	// For any capacity that is not explicitly requested:
	// - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity
	//   (i.e., the whole device is claimed).
	// - If a requestPolicy is set, the default consumed capacity is determined according to that policy.
	//
	// If the device allows multiple allocation,
	// the aggregated amount across all requests must not exceed the capacity value.
	// The consumed capacity, which may be adjusted based on the requestPolicy if defined,
	// is recorded in the resource claim’s status.devices[*].consumedCapacity field.
	//
	// +optional
	Requests map[QualifiedName]resource.Quantity `json:"requests,omitempty" protobuf:"bytes,1,rep,name=requests,castkey=QualifiedName"`
}

CapacityRequirements defines the capacity requirements for a specific device request.

func (*CapacityRequirements) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapacityRequirements.

func (*CapacityRequirements) DeepCopyInto

func (in *CapacityRequirements) DeepCopyInto(out *CapacityRequirements)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CapacityRequirements) Marshal

func (m *CapacityRequirements) Marshal() (dAtA []byte, err error)

func (*CapacityRequirements) MarshalTo

func (m *CapacityRequirements) MarshalTo(dAtA []byte) (int, error)

func (*CapacityRequirements) MarshalToSizedBuffer

func (m *CapacityRequirements) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (CapacityRequirements) OpenAPIModelName

func (in CapacityRequirements) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*CapacityRequirements) Reset

func (m *CapacityRequirements) Reset()

func (*CapacityRequirements) Size

func (m *CapacityRequirements) Size() (n int)

func (*CapacityRequirements) String

func (this *CapacityRequirements) String() string

func (CapacityRequirements) SwaggerDoc

func (CapacityRequirements) SwaggerDoc() map[string]string

func (*CapacityRequirements) Unmarshal

func (m *CapacityRequirements) Unmarshal(dAtA []byte) error

type Counter

type Counter struct {
	// Value defines how much of a certain device counter is available.
	//
	// +required
	Value resource.Quantity `json:"value" protobuf:"bytes,1,rep,name=value"`
}

Counter describes a quantity associated with a device.

func (*Counter) DeepCopy

func (in *Counter) DeepCopy() *Counter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Counter.

func (*Counter) DeepCopyInto

func (in *Counter) DeepCopyInto(out *Counter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Counter) Marshal

func (m *Counter) Marshal() (dAtA []byte, err error)

func (*Counter) MarshalTo

func (m *Counter) MarshalTo(dAtA []byte) (int, error)

func (*Counter) MarshalToSizedBuffer

func (m *Counter) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (Counter) OpenAPIModelName

func (in Counter) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*Counter) Reset

func (m *Counter) Reset()

func (*Counter) Size

func (m *Counter) Size() (n int)

func (*Counter) String

func (this *Counter) String() string

func (Counter) SwaggerDoc

func (Counter) SwaggerDoc() map[string]string

func (*Counter) Unmarshal

func (m *Counter) Unmarshal(dAtA []byte) error

type CounterSet

type CounterSet struct {
	// Name defines the name of the counter set.
	// It must be a DNS label.
	//
	// +required
	// +k8s:alpha(since: "1.36")=+k8s:required
	// +k8s:alpha(since: "1.36")=+k8s:format=k8s-short-name
	Name string `json:"name" protobuf:"bytes,1,name=name"`

	// Counters defines the set of counters for this CounterSet
	// The name of each counter must be unique in that set and must be a DNS label.
	//
	// The maximum number of counters is 32.
	//
	// +required
	// +k8s:alpha(since: "1.36")=+k8s:required
	// +k8s:alpha(since: "1.36")=+k8s:eachKey=+k8s:format=k8s-short-name
	Counters map[string]Counter `json:"counters,omitempty" protobuf:"bytes,2,name=counters"`
}

CounterSet defines a named set of counters that are available to be used by devices defined in the ResourcePool.

The counters are not allocatable by themselves, but can be referenced by devices. When a device is allocated, the portion of counters it uses will no longer be available for use by other devices.

func (*CounterSet) DeepCopy

func (in *CounterSet) DeepCopy() *CounterSet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CounterSet.

func (*CounterSet) DeepCopyInto

func (in *CounterSet) DeepCopyInto(out *CounterSet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CounterSet) Marshal

func (m *CounterSet) Marshal() (dAtA []byte, err error)

func (*CounterSet) MarshalTo

func (m *CounterSet) MarshalTo(dAtA []byte) (int, error)

func (*CounterSet) MarshalToSizedBuffer

func (m *CounterSet) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (CounterSet) OpenAPIModelName

func (in CounterSet) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*CounterSet) Reset

func (m *CounterSet) Reset()

func (*CounterSet) Size

func (m *CounterSet) Size() (n int)

func (*CounterSet) String

func (this *CounterSet) String() string

func (CounterSet) SwaggerDoc

func (CounterSet) SwaggerDoc() map[string]string

func (*CounterSet) Unmarshal

func (m *CounterSet) Unmarshal(dAtA []byte) error

type Device

type Device struct {
	// Name is unique identifier among all devices managed by
	// the driver in the pool. It must be a DNS label.
	//
	// +required
	Name string `json:"name" protobuf:"bytes,1,name=name"`

	// Attributes defines the set of attributes for this device.
	// The name of each attribute must be unique in that set.
	//
	// The maximum number of attributes and capacities combined is 32.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	Attributes map[QualifiedName]DeviceAttribute `json:"attributes,omitempty" protobuf:"bytes,2,rep,name=attributes"`

	// Capacity defines the set of capacities for this device.
	// The name of each capacity must be unique in that set.
	//
	// The maximum number of attributes and capacities combined is 32.
	//
	// +optional
	Capacity map[QualifiedName]DeviceCapacity `json:"capacity,omitempty" protobuf:"bytes,3,rep,name=capacity"`

	// ConsumesCounters defines a list of references to sharedCounters
	// and the set of counters that the device will
	// consume from those counter sets.
	//
	// There can only be a single entry per counterSet.
	//
	// The maximum number of device counter consumptions per
	// device is 2.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +listType=atomic
	// +k8s:listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:unique=map
	// +k8s:alpha(since: "1.36")=+k8s:listMapKey=counterSet
	// +featureGate=DRAPartitionableDevices
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=2
	ConsumesCounters []DeviceCounterConsumption `json:"consumesCounters,omitempty" protobuf:"bytes,4,rep,name=consumesCounters"`

	// NodeName identifies the node where the device is available.
	//
	// Must only be set if Spec.PerDeviceNodeSelection is set to true.
	// At most one of NodeName, NodeSelector and AllNodes can be set.
	//
	// +optional
	// +oneOf=DeviceNodeSelection
	// +featureGate=DRAPartitionableDevices
	NodeName *string `json:"nodeName,omitempty" protobuf:"bytes,5,opt,name=nodeName"`

	// NodeSelector defines the nodes where the device is available.
	//
	// Must use exactly one term.
	//
	// Must only be set if Spec.PerDeviceNodeSelection is set to true.
	// At most one of NodeName, NodeSelector and AllNodes can be set.
	//
	// +optional
	// +oneOf=DeviceNodeSelection
	// +featureGate=DRAPartitionableDevices
	NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,6,opt,name=nodeSelector"`

	// AllNodes indicates that all nodes have access to the device.
	//
	// Must only be set if Spec.PerDeviceNodeSelection is set to true.
	// At most one of NodeName, NodeSelector and AllNodes can be set.
	//
	// +optional
	// +oneOf=DeviceNodeSelection
	// +featureGate=DRAPartitionableDevices
	AllNodes *bool `json:"allNodes,omitempty" protobuf:"bytes,7,opt,name=allNodes"`

	// If specified, these are the driver-defined taints.
	//
	// The maximum number of taints is 16. If taints are set for
	// any device in a ResourceSlice, then the maximum number of
	// allowed devices per ResourceSlice is 64 instead of 128.
	//
	// This is a beta field and requires enabling the DRADeviceTaints
	// feature gate.
	//
	// +optional
	// +listType=atomic
	// +featureGate=DRADeviceTaints
	// +k8s:alpha(since: "1.36")=+k8s:optional
	Taints []DeviceTaint `json:"taints,omitempty" protobuf:"bytes,8,rep,name=taints"`

	// BindsToNode indicates if the usage of an allocation involving this device
	// has to be limited to exactly the node that was chosen when allocating the claim.
	// If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector
	// to match the node where the allocation was made.
	//
	// This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
	// feature gates.
	//
	// +optional
	// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
	BindsToNode *bool `json:"bindsToNode,omitempty" protobuf:"varint,9,opt,name=bindsToNode"`

	// BindingConditions defines the conditions for proceeding with binding.
	// All of these conditions must be set in the per-device status
	// conditions with a value of True to proceed with binding the pod to the node
	// while scheduling the pod.
	//
	// The maximum number of binding conditions is 4.
	//
	// The conditions must be a valid condition type string.
	//
	// This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
	// feature gates.
	//
	// +optional
	// +listType=atomic
	// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=4
	BindingConditions []string `json:"bindingConditions,omitempty" protobuf:"bytes,10,rep,name=bindingConditions"`

	// BindingFailureConditions defines the conditions for binding failure.
	// They may be set in the per-device status conditions.
	// If any is set to "True", a binding failure occurred.
	//
	// The maximum number of binding failure conditions is 4.
	//
	// The conditions must be a valid condition type string.
	//
	// This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
	// feature gates.
	//
	// +optional
	// +listType=atomic
	// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=4
	BindingFailureConditions []string `json:"bindingFailureConditions,omitempty" protobuf:"bytes,11,rep,name=bindingFailureConditions"`

	// AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests.
	//
	// 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.
	//
	// +optional
	// +featureGate=DRAConsumableCapacity
	AllowMultipleAllocations *bool `json:"allowMultipleAllocations,omitempty" protobuf:"bytes,12,opt,name=allowMultipleAllocations"`

	// 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.
	// +optional
	// +featureGate=DRANodeAllocatableResources
	NodeAllocatableResourceMappings map[v1.ResourceName]NodeAllocatableResourceMapping `json:"nodeAllocatableResourceMappings,omitempty" protobuf:"bytes,13,opt,name=nodeAllocatableResourceMappings"`
}

Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.

func (*Device) DeepCopy

func (in *Device) DeepCopy() *Device

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Device.

func (*Device) DeepCopyInto

func (in *Device) DeepCopyInto(out *Device)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Device) Marshal

func (m *Device) Marshal() (dAtA []byte, err error)

func (*Device) MarshalTo

func (m *Device) MarshalTo(dAtA []byte) (int, error)

func (*Device) MarshalToSizedBuffer

func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (Device) OpenAPIModelName

func (in Device) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*Device) Reset

func (m *Device) Reset()

func (*Device) Size

func (m *Device) Size() (n int)

func (*Device) String

func (this *Device) String() string

func (Device) SwaggerDoc

func (Device) SwaggerDoc() map[string]string

func (*Device) Unmarshal

func (m *Device) Unmarshal(dAtA []byte) error

type DeviceAllocationConfiguration

type DeviceAllocationConfiguration struct {
	// Source records whether the configuration comes from a class and thus
	// is not something that a normal user would have been able to set
	// or from a claim.
	//
	// +required
	// +k8s:alpha(since: "1.36")=+k8s:required
	Source AllocationConfigSource `json:"source" protobuf:"bytes,1,name=source"`

	// Requests lists the names of requests where the configuration applies.
	// If empty, its applies to all requests.
	//
	// References to subrequests must include the name of the main request
	// and may include the subrequest using the format <main request>[/<subrequest>]. If just
	// the main request is given, the configuration applies to all subrequests.
	//
	// +optional
	// +listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:unique=set
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
	Requests []string `json:"requests,omitempty" protobuf:"bytes,2,opt,name=requests"`

	DeviceConfiguration `json:",inline" protobuf:"bytes,3,name=deviceConfiguration"`
}

DeviceAllocationConfiguration gets embedded in an AllocationResult.

func (*DeviceAllocationConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAllocationConfiguration.

func (*DeviceAllocationConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceAllocationConfiguration) Marshal

func (m *DeviceAllocationConfiguration) Marshal() (dAtA []byte, err error)

func (*DeviceAllocationConfiguration) MarshalTo

func (m *DeviceAllocationConfiguration) MarshalTo(dAtA []byte) (int, error)

func (*DeviceAllocationConfiguration) MarshalToSizedBuffer

func (m *DeviceAllocationConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceAllocationConfiguration) OpenAPIModelName

func (in DeviceAllocationConfiguration) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceAllocationConfiguration) Reset

func (m *DeviceAllocationConfiguration) Reset()

func (*DeviceAllocationConfiguration) Size

func (m *DeviceAllocationConfiguration) Size() (n int)

func (*DeviceAllocationConfiguration) String

func (this *DeviceAllocationConfiguration) String() string

func (DeviceAllocationConfiguration) SwaggerDoc

func (DeviceAllocationConfiguration) SwaggerDoc() map[string]string

func (*DeviceAllocationConfiguration) Unmarshal

func (m *DeviceAllocationConfiguration) Unmarshal(dAtA []byte) error

type DeviceAllocationMode

type DeviceAllocationMode string

+enum +k8s:alpha(since: "1.36")=+k8s:enum

type DeviceAllocationResult

type DeviceAllocationResult struct {
	// Results lists all allocated devices.
	//
	// +optional
	// +listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
	Results []DeviceRequestAllocationResult `json:"results,omitempty" protobuf:"bytes,1,opt,name=results"`

	// This field is a combination of all the claim and class configuration parameters.
	// Drivers can distinguish between those based on a flag.
	//
	// This includes configuration parameters for drivers which have no allocated
	// devices in the result because it is up to the drivers which configuration
	// parameters they support. They can silently ignore unknown configuration
	// parameters.
	//
	// +optional
	// +listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=64
	Config []DeviceAllocationConfiguration `json:"config,omitempty" protobuf:"bytes,2,opt,name=config"`
}

DeviceAllocationResult is the result of allocating devices.

func (*DeviceAllocationResult) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAllocationResult.

func (*DeviceAllocationResult) DeepCopyInto

func (in *DeviceAllocationResult) DeepCopyInto(out *DeviceAllocationResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceAllocationResult) Marshal

func (m *DeviceAllocationResult) Marshal() (dAtA []byte, err error)

func (*DeviceAllocationResult) MarshalTo

func (m *DeviceAllocationResult) MarshalTo(dAtA []byte) (int, error)

func (*DeviceAllocationResult) MarshalToSizedBuffer

func (m *DeviceAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceAllocationResult) OpenAPIModelName

func (in DeviceAllocationResult) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceAllocationResult) Reset

func (m *DeviceAllocationResult) Reset()

func (*DeviceAllocationResult) Size

func (m *DeviceAllocationResult) Size() (n int)

func (*DeviceAllocationResult) String

func (this *DeviceAllocationResult) String() string

func (DeviceAllocationResult) SwaggerDoc

func (DeviceAllocationResult) SwaggerDoc() map[string]string

func (*DeviceAllocationResult) Unmarshal

func (m *DeviceAllocationResult) Unmarshal(dAtA []byte) error

type DeviceAttribute

type DeviceAttribute struct {

	// IntValue is a number.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:unionMember
	IntValue *int64 `json:"int,omitempty" protobuf:"varint,2,opt,name=int"`

	// BoolValue is a true/false value.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:unionMember
	BoolValue *bool `json:"bool,omitempty" protobuf:"varint,3,opt,name=bool"`

	// StringValue is a string. Must not be longer than 64 characters.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:unionMember
	StringValue *string `json:"string,omitempty" protobuf:"bytes,4,opt,name=string"`

	// VersionValue is a semantic version according to semver.org spec 2.0.0.
	// Must not be longer than 64 characters.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:unionMember
	VersionValue *string `json:"version,omitempty" protobuf:"bytes,5,opt,name=version"`
}

DeviceAttribute must have exactly one field set.

func (*DeviceAttribute) DeepCopy

func (in *DeviceAttribute) DeepCopy() *DeviceAttribute

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAttribute.

func (*DeviceAttribute) DeepCopyInto

func (in *DeviceAttribute) DeepCopyInto(out *DeviceAttribute)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceAttribute) Marshal

func (m *DeviceAttribute) Marshal() (dAtA []byte, err error)

func (*DeviceAttribute) MarshalTo

func (m *DeviceAttribute) MarshalTo(dAtA []byte) (int, error)

func (*DeviceAttribute) MarshalToSizedBuffer

func (m *DeviceAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceAttribute) OpenAPIModelName

func (in DeviceAttribute) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceAttribute) Reset

func (m *DeviceAttribute) Reset()

func (*DeviceAttribute) Size

func (m *DeviceAttribute) Size() (n int)

func (*DeviceAttribute) String

func (this *DeviceAttribute) String() string

func (DeviceAttribute) SwaggerDoc

func (DeviceAttribute) SwaggerDoc() map[string]string

func (*DeviceAttribute) Unmarshal

func (m *DeviceAttribute) Unmarshal(dAtA []byte) error

type DeviceCapacity

type DeviceCapacity struct {
	// Value defines how much of a certain capacity that device has.
	//
	// This field reflects the fixed total capacity and does not change.
	// The consumed amount is tracked separately by scheduler
	// and does not affect this value.
	//
	// +required
	Value resource.Quantity `json:"value" protobuf:"bytes,1,rep,name=value"`

	// RequestPolicy defines how this DeviceCapacity must be consumed
	// when the device is allowed to be shared by multiple allocations.
	//
	// The Device must have allowMultipleAllocations set to true in order to set a requestPolicy.
	//
	// If unset, capacity requests are unconstrained:
	// requests can consume any amount of capacity, as long as the total consumed
	// across all allocations does not exceed the device's defined capacity.
	// If request is also unset, default is the full capacity value.
	//
	// +optional
	// +featureGate=DRAConsumableCapacity
	RequestPolicy *CapacityRequestPolicy `json:"requestPolicy,omitempty" protobuf:"bytes,2,opt,name=requestPolicy"`
}

DeviceCapacity describes a quantity associated with a device.

func (*DeviceCapacity) DeepCopy

func (in *DeviceCapacity) DeepCopy() *DeviceCapacity

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceCapacity.

func (*DeviceCapacity) DeepCopyInto

func (in *DeviceCapacity) DeepCopyInto(out *DeviceCapacity)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceCapacity) Marshal

func (m *DeviceCapacity) Marshal() (dAtA []byte, err error)

func (*DeviceCapacity) MarshalTo

func (m *DeviceCapacity) MarshalTo(dAtA []byte) (int, error)

func (*DeviceCapacity) MarshalToSizedBuffer

func (m *DeviceCapacity) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceCapacity) OpenAPIModelName

func (in DeviceCapacity) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceCapacity) Reset

func (m *DeviceCapacity) Reset()

func (*DeviceCapacity) Size

func (m *DeviceCapacity) Size() (n int)

func (*DeviceCapacity) String

func (this *DeviceCapacity) String() string

func (DeviceCapacity) SwaggerDoc

func (DeviceCapacity) SwaggerDoc() map[string]string

func (*DeviceCapacity) Unmarshal

func (m *DeviceCapacity) Unmarshal(dAtA []byte) error

type DeviceClaim

type DeviceClaim struct {
	// Requests represent individual requests for distinct devices which
	// must all be satisfied. If empty, nothing needs to be allocated.
	//
	// +optional
	// +listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:unique=map
	// +k8s:alpha(since: "1.36")=+k8s:listMapKey=name
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
	Requests []DeviceRequest `json:"requests" protobuf:"bytes,1,name=requests"`

	// These constraints must be satisfied by the set of devices that get
	// allocated for the claim.
	//
	// +optional
	// +listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
	Constraints []DeviceConstraint `json:"constraints,omitempty" protobuf:"bytes,2,opt,name=constraints"`

	// This field holds configuration for multiple potential drivers which
	// could satisfy requests in this claim. It is ignored while allocating
	// the claim.
	//
	// +optional
	// +listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
	Config []DeviceClaimConfiguration `json:"config,omitempty" protobuf:"bytes,3,opt,name=config"`
}

DeviceClaim defines how to request devices with a ResourceClaim.

func (*DeviceClaim) DeepCopy

func (in *DeviceClaim) DeepCopy() *DeviceClaim

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClaim.

func (*DeviceClaim) DeepCopyInto

func (in *DeviceClaim) DeepCopyInto(out *DeviceClaim)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceClaim) Marshal

func (m *DeviceClaim) Marshal() (dAtA []byte, err error)

func (*DeviceClaim) MarshalTo

func (m *DeviceClaim) MarshalTo(dAtA []byte) (int, error)

func (*DeviceClaim) MarshalToSizedBuffer

func (m *DeviceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceClaim) OpenAPIModelName

func (in DeviceClaim) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceClaim) Reset

func (m *DeviceClaim) Reset()

func (*DeviceClaim) Size

func (m *DeviceClaim) Size() (n int)

func (*DeviceClaim) String

func (this *DeviceClaim) String() string

func (DeviceClaim) SwaggerDoc

func (DeviceClaim) SwaggerDoc() map[string]string

func (*DeviceClaim) Unmarshal

func (m *DeviceClaim) Unmarshal(dAtA []byte) error

type DeviceClaimConfiguration

type DeviceClaimConfiguration struct {
	// Requests lists the names of requests where the configuration applies.
	// If empty, it applies to all requests.
	//
	// References to subrequests must include the name of the main request
	// and may include the subrequest using the format <main request>[/<subrequest>]. If just
	// the main request is given, the configuration applies to all subrequests.
	//
	// +optional
	// +listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:unique=set
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
	Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"`

	DeviceConfiguration `json:",inline" protobuf:"bytes,2,name=deviceConfiguration"`
}

DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.

func (*DeviceClaimConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClaimConfiguration.

func (*DeviceClaimConfiguration) DeepCopyInto

func (in *DeviceClaimConfiguration) DeepCopyInto(out *DeviceClaimConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceClaimConfiguration) Marshal

func (m *DeviceClaimConfiguration) Marshal() (dAtA []byte, err error)

func (*DeviceClaimConfiguration) MarshalTo

func (m *DeviceClaimConfiguration) MarshalTo(dAtA []byte) (int, error)

func (*DeviceClaimConfiguration) MarshalToSizedBuffer

func (m *DeviceClaimConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceClaimConfiguration) OpenAPIModelName

func (in DeviceClaimConfiguration) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceClaimConfiguration) Reset

func (m *DeviceClaimConfiguration) Reset()

func (*DeviceClaimConfiguration) Size

func (m *DeviceClaimConfiguration) Size() (n int)

func (*DeviceClaimConfiguration) String

func (this *DeviceClaimConfiguration) String() string

func (DeviceClaimConfiguration) SwaggerDoc

func (DeviceClaimConfiguration) SwaggerDoc() map[string]string

func (*DeviceClaimConfiguration) Unmarshal

func (m *DeviceClaimConfiguration) Unmarshal(dAtA []byte) error

type DeviceClass

type DeviceClass struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object metadata
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:subfield(name)=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:subfield(name)=+k8s:format=k8s-long-name
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Spec defines what can be allocated and how to configure it.
	//
	// This is mutable. Consumers have to be prepared for classes changing
	// at any time, either because they get updated or replaced. Claim
	// allocations are done once based on whatever was set in classes at
	// the time of allocation.
	//
	// Changing the spec automatically increments the metadata.generation number.
	Spec DeviceClassSpec `json:"spec" protobuf:"bytes,2,name=spec"`
}

DeviceClass is a vendor- or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.

func (*DeviceClass) APILifecycleIntroduced

func (in *DeviceClass) APILifecycleIntroduced() (major, minor int)

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 (*DeviceClass) DeepCopy

func (in *DeviceClass) DeepCopy() *DeviceClass

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClass.

func (*DeviceClass) DeepCopyInto

func (in *DeviceClass) DeepCopyInto(out *DeviceClass)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceClass) DeepCopyObject

func (in *DeviceClass) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*DeviceClass) Marshal

func (m *DeviceClass) Marshal() (dAtA []byte, err error)

func (*DeviceClass) MarshalTo

func (m *DeviceClass) MarshalTo(dAtA []byte) (int, error)

func (*DeviceClass) MarshalToSizedBuffer

func (m *DeviceClass) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceClass) OpenAPIModelName

func (in DeviceClass) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceClass) Reset

func (m *DeviceClass) Reset()

func (*DeviceClass) Size

func (m *DeviceClass) Size() (n int)

func (*DeviceClass) String

func (this *DeviceClass) String() string

func (DeviceClass) SwaggerDoc

func (DeviceClass) SwaggerDoc() map[string]string

func (*DeviceClass) Unmarshal

func (m *DeviceClass) Unmarshal(dAtA []byte) error

type DeviceClassConfiguration

type DeviceClassConfiguration struct {
	DeviceConfiguration `json:",inline" protobuf:"bytes,1,opt,name=deviceConfiguration"`
}

DeviceClassConfiguration is used in DeviceClass.

func (*DeviceClassConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassConfiguration.

func (*DeviceClassConfiguration) DeepCopyInto

func (in *DeviceClassConfiguration) DeepCopyInto(out *DeviceClassConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceClassConfiguration) Marshal

func (m *DeviceClassConfiguration) Marshal() (dAtA []byte, err error)

func (*DeviceClassConfiguration) MarshalTo

func (m *DeviceClassConfiguration) MarshalTo(dAtA []byte) (int, error)

func (*DeviceClassConfiguration) MarshalToSizedBuffer

func (m *DeviceClassConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceClassConfiguration) OpenAPIModelName

func (in DeviceClassConfiguration) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceClassConfiguration) Reset

func (m *DeviceClassConfiguration) Reset()

func (*DeviceClassConfiguration) Size

func (m *DeviceClassConfiguration) Size() (n int)

func (*DeviceClassConfiguration) String

func (this *DeviceClassConfiguration) String() string

func (DeviceClassConfiguration) SwaggerDoc

func (DeviceClassConfiguration) SwaggerDoc() map[string]string

func (*DeviceClassConfiguration) Unmarshal

func (m *DeviceClassConfiguration) Unmarshal(dAtA []byte) error

type DeviceClassList

type DeviceClassList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Items is the list of resource classes.
	Items []DeviceClass `json:"items" protobuf:"bytes,2,rep,name=items"`
}

DeviceClassList is a collection of classes.

func (*DeviceClassList) APILifecycleIntroduced

func (in *DeviceClassList) APILifecycleIntroduced() (major, minor int)

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 (*DeviceClassList) DeepCopy

func (in *DeviceClassList) DeepCopy() *DeviceClassList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassList.

func (*DeviceClassList) DeepCopyInto

func (in *DeviceClassList) DeepCopyInto(out *DeviceClassList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceClassList) DeepCopyObject

func (in *DeviceClassList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*DeviceClassList) Marshal

func (m *DeviceClassList) Marshal() (dAtA []byte, err error)

func (*DeviceClassList) MarshalTo

func (m *DeviceClassList) MarshalTo(dAtA []byte) (int, error)

func (*DeviceClassList) MarshalToSizedBuffer

func (m *DeviceClassList) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceClassList) OpenAPIModelName

func (in DeviceClassList) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceClassList) Reset

func (m *DeviceClassList) Reset()

func (*DeviceClassList) Size

func (m *DeviceClassList) Size() (n int)

func (*DeviceClassList) String

func (this *DeviceClassList) String() string

func (DeviceClassList) SwaggerDoc

func (DeviceClassList) SwaggerDoc() map[string]string

func (*DeviceClassList) Unmarshal

func (m *DeviceClassList) Unmarshal(dAtA []byte) error

type DeviceClassSpec

type DeviceClassSpec struct {
	// Each selector must be satisfied by a device which is claimed via this class.
	//
	// +optional
	// +listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
	Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,1,opt,name=selectors"`

	// Config defines configuration parameters that apply to each device that is claimed via this class.
	// Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor
	// configuration applies to exactly one driver.
	//
	// They are passed to the driver, but are not considered while allocating the claim.
	//
	// +optional
	// +listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
	Config []DeviceClassConfiguration `json:"config,omitempty" protobuf:"bytes,2,opt,name=config"`

	// ExtendedResourceName is the extended resource name for the devices of this class.
	// The devices of this class can be used to satisfy a pod's extended resource requests.
	// It has the same format as the name of a pod's extended resource.
	// It should be unique among all the device classes in a cluster.
	// If two device classes have the same name, then the class created later
	// is picked to satisfy a pod's extended resource requests.
	// If two classes are created at the same time, then the name of the class
	// lexicographically sorted first is picked.
	//
	// This is a beta field.
	// +optional
	// +featureGate=DRAExtendedResource
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:format=k8s-extended-resource-name
	ExtendedResourceName *string `json:"extendedResourceName,omitempty" protobuf:"bytes,4,opt,name=extendedResourceName"`
}

DeviceClassSpec is used in a DeviceClass to define what can be allocated and how to configure it.

func (*DeviceClassSpec) DeepCopy

func (in *DeviceClassSpec) DeepCopy() *DeviceClassSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassSpec.

func (*DeviceClassSpec) DeepCopyInto

func (in *DeviceClassSpec) DeepCopyInto(out *DeviceClassSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceClassSpec) Marshal

func (m *DeviceClassSpec) Marshal() (dAtA []byte, err error)

func (*DeviceClassSpec) MarshalTo

func (m *DeviceClassSpec) MarshalTo(dAtA []byte) (int, error)

func (*DeviceClassSpec) MarshalToSizedBuffer

func (m *DeviceClassSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceClassSpec) OpenAPIModelName

func (in DeviceClassSpec) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceClassSpec) Reset

func (m *DeviceClassSpec) Reset()

func (*DeviceClassSpec) Size

func (m *DeviceClassSpec) Size() (n int)

func (*DeviceClassSpec) String

func (this *DeviceClassSpec) String() string

func (DeviceClassSpec) SwaggerDoc

func (DeviceClassSpec) SwaggerDoc() map[string]string

func (*DeviceClassSpec) Unmarshal

func (m *DeviceClassSpec) Unmarshal(dAtA []byte) error

type DeviceConfiguration

type DeviceConfiguration struct {
	// Opaque provides driver-specific configuration parameters.
	//
	// +optional
	// +oneOf=ConfigurationType
	// +k8s:alpha(since: "1.36")=+k8s:optional
	Opaque *OpaqueDeviceConfiguration `json:"opaque,omitempty" protobuf:"bytes,1,opt,name=opaque"`
}

DeviceConfiguration must have exactly one field set. It gets embedded inline in some other structs which have other fields, so field names must not conflict with those.

func (*DeviceConfiguration) DeepCopy

func (in *DeviceConfiguration) DeepCopy() *DeviceConfiguration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceConfiguration.

func (*DeviceConfiguration) DeepCopyInto

func (in *DeviceConfiguration) DeepCopyInto(out *DeviceConfiguration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceConfiguration) Marshal

func (m *DeviceConfiguration) Marshal() (dAtA []byte, err error)

func (*DeviceConfiguration) MarshalTo

func (m *DeviceConfiguration) MarshalTo(dAtA []byte) (int, error)

func (*DeviceConfiguration) MarshalToSizedBuffer

func (m *DeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceConfiguration) OpenAPIModelName

func (in DeviceConfiguration) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceConfiguration) Reset

func (m *DeviceConfiguration) Reset()

func (*DeviceConfiguration) Size

func (m *DeviceConfiguration) Size() (n int)

func (*DeviceConfiguration) String

func (this *DeviceConfiguration) String() string

func (DeviceConfiguration) SwaggerDoc

func (DeviceConfiguration) SwaggerDoc() map[string]string

func (*DeviceConfiguration) Unmarshal

func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error

type DeviceConstraint

type DeviceConstraint struct {
	// Requests is a list of the one or more requests in this claim which
	// must co-satisfy this constraint. If a request is fulfilled by
	// multiple devices, then all of the devices must satisfy the
	// constraint. If this is not specified, this constraint applies to all
	// requests in this claim.
	//
	// References to subrequests must include the name of the main request
	// and may include the subrequest using the format <main request>[/<subrequest>]. If just
	// the main request is given, the constraint applies to all subrequests.
	//
	// +optional
	// +listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:unique=set
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
	Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"`

	// MatchAttribute requires that all devices in question have this
	// attribute and that its type and value are the same across those
	// devices.
	//
	// For example, if you specified "dra.example.com/numa" (a hypothetical example!),
	// then only devices in the same NUMA node will be chosen. A device which
	// does not have that attribute will not be chosen. All devices should
	// use a value of the same type for this attribute because that is part of
	// its specification, but if one device doesn't, then it also will not be
	// chosen.
	//
	// Must include the domain qualifier.
	//
	// +optional
	// +oneOf=ConstraintType
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:format=k8s-resource-fully-qualified-name
	MatchAttribute *FullyQualifiedName `json:"matchAttribute,omitempty" protobuf:"bytes,2,opt,name=matchAttribute"`

	// DistinctAttribute requires that all devices in question have this
	// attribute and that its type and value are unique across those devices.
	//
	// This acts as the inverse of MatchAttribute.
	//
	// This constraint is used to avoid allocating multiple requests to the same device
	// by ensuring attribute-level differentiation.
	//
	// This is useful for scenarios where resource requests must be fulfilled by separate physical devices.
	// For example, a container requests two network interfaces that must be allocated from two different physical NICs.
	//
	// +optional
	// +oneOf=ConstraintType
	// +featureGate=DRAConsumableCapacity
	DistinctAttribute *FullyQualifiedName `json:"distinctAttribute,omitempty" protobuf:"bytes,3,opt,name=distinctAttribute"`
}

DeviceConstraint must have exactly one field set besides Requests.

func (*DeviceConstraint) DeepCopy

func (in *DeviceConstraint) DeepCopy() *DeviceConstraint

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceConstraint.

func (*DeviceConstraint) DeepCopyInto

func (in *DeviceConstraint) DeepCopyInto(out *DeviceConstraint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceConstraint) Marshal

func (m *DeviceConstraint) Marshal() (dAtA []byte, err error)

func (*DeviceConstraint) MarshalTo

func (m *DeviceConstraint) MarshalTo(dAtA []byte) (int, error)

func (*DeviceConstraint) MarshalToSizedBuffer

func (m *DeviceConstraint) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceConstraint) OpenAPIModelName

func (in DeviceConstraint) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceConstraint) Reset

func (m *DeviceConstraint) Reset()

func (*DeviceConstraint) Size

func (m *DeviceConstraint) Size() (n int)

func (*DeviceConstraint) String

func (this *DeviceConstraint) String() string

func (DeviceConstraint) SwaggerDoc

func (DeviceConstraint) SwaggerDoc() map[string]string

func (*DeviceConstraint) Unmarshal

func (m *DeviceConstraint) Unmarshal(dAtA []byte) error

type DeviceCounterConsumption

type DeviceCounterConsumption struct {
	// CounterSet is the name of the set from which the
	// counters defined will be consumed.
	//
	// +required
	// +k8s:alpha(since: "1.36")=+k8s:required
	// +k8s:alpha(since: "1.36")=+k8s:format=k8s-short-name
	CounterSet string `json:"counterSet" protobuf:"bytes,1,opt,name=counterSet"`

	// Counters defines the counters that will be consumed by the device.
	//
	// The maximum number of counters is 32.
	//
	// +required
	// +k8s:alpha(since: "1.36")=+k8s:required
	// +k8s:alpha(since: "1.36")=+k8s:eachKey=+k8s:format=k8s-short-name
	Counters map[string]Counter `json:"counters,omitempty" protobuf:"bytes,2,opt,name=counters"`
}

DeviceCounterConsumption defines a set of counters that a device will consume from a CounterSet.

func (*DeviceCounterConsumption) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceCounterConsumption.

func (*DeviceCounterConsumption) DeepCopyInto

func (in *DeviceCounterConsumption) DeepCopyInto(out *DeviceCounterConsumption)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceCounterConsumption) Marshal

func (m *DeviceCounterConsumption) Marshal() (dAtA []byte, err error)

func (*DeviceCounterConsumption) MarshalTo

func (m *DeviceCounterConsumption) MarshalTo(dAtA []byte) (int, error)

func (*DeviceCounterConsumption) MarshalToSizedBuffer

func (m *DeviceCounterConsumption) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceCounterConsumption) OpenAPIModelName

func (in DeviceCounterConsumption) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceCounterConsumption) Reset

func (m *DeviceCounterConsumption) Reset()

func (*DeviceCounterConsumption) Size

func (m *DeviceCounterConsumption) Size() (n int)

func (*DeviceCounterConsumption) String

func (this *DeviceCounterConsumption) String() string

func (DeviceCounterConsumption) SwaggerDoc

func (DeviceCounterConsumption) SwaggerDoc() map[string]string

func (*DeviceCounterConsumption) Unmarshal

func (m *DeviceCounterConsumption) Unmarshal(dAtA []byte) error

type DeviceRequest

type DeviceRequest struct {
	// Name can be used to reference this request in a pod.spec.containers[].resources.claims
	// entry and in a constraint of the claim.
	//
	// References using the name in the DeviceRequest will uniquely
	// identify a request when the Exactly field is set. When the
	// FirstAvailable field is set, a reference to the name of the
	// DeviceRequest will match whatever subrequest is chosen by the
	// scheduler.
	//
	// Must be a DNS label.
	//
	// +required
	Name string `json:"name" protobuf:"bytes,1,name=name"`

	// Exactly specifies the details for a single request that must
	// be met exactly for the request to be satisfied.
	//
	// One of Exactly or FirstAvailable must be set.
	//
	// +optional
	// +oneOf=deviceRequestType
	// +k8s:alpha(since: "1.36")=+k8s:optional
	Exactly *ExactDeviceRequest `json:"exactly,omitempty" protobuf:"bytes,2,name=exactly"`

	// FirstAvailable contains subrequests, of which exactly one will be
	// selected by the scheduler. It tries to
	// satisfy them in the order in which they are listed here. So if
	// there are two entries in the list, the scheduler will only check
	// the second one if it determines that the first one can not be used.
	//
	// DRA does not yet implement scoring, so the scheduler will
	// select the first set of devices that satisfies all the
	// requests in the claim. And if the requirements can
	// be satisfied on more than one node, other scheduling features
	// will determine which node is chosen. This means that the set of
	// devices allocated to a claim might not be the optimal set
	// available to the cluster. Scoring will be implemented later.
	//
	// +optional
	// +oneOf=deviceRequestType
	// +listType=atomic
	// +featureGate=DRAPrioritizedList
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:unique=map
	// +k8s:alpha(since: "1.36")=+k8s:listMapKey=name
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=8
	FirstAvailable []DeviceSubRequest `json:"firstAvailable,omitempty" protobuf:"bytes,3,name=firstAvailable"`
}

DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices. With FirstAvailable it is also possible to provide a prioritized list of requests.

func (*DeviceRequest) DeepCopy

func (in *DeviceRequest) DeepCopy() *DeviceRequest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceRequest.

func (*DeviceRequest) DeepCopyInto

func (in *DeviceRequest) DeepCopyInto(out *DeviceRequest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceRequest) Marshal

func (m *DeviceRequest) Marshal() (dAtA []byte, err error)

func (*DeviceRequest) MarshalTo

func (m *DeviceRequest) MarshalTo(dAtA []byte) (int, error)

func (*DeviceRequest) MarshalToSizedBuffer

func (m *DeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceRequest) OpenAPIModelName

func (in DeviceRequest) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceRequest) Reset

func (m *DeviceRequest) Reset()

func (*DeviceRequest) Size

func (m *DeviceRequest) Size() (n int)

func (*DeviceRequest) String

func (this *DeviceRequest) String() string

func (DeviceRequest) SwaggerDoc

func (DeviceRequest) SwaggerDoc() map[string]string

func (*DeviceRequest) Unmarshal

func (m *DeviceRequest) Unmarshal(dAtA []byte) error

type DeviceRequestAllocationResult

type DeviceRequestAllocationResult struct {
	// Request is the name of the request in the claim which caused this
	// device to be allocated. If it references a subrequest in the
	// firstAvailable list on a DeviceRequest, this field must
	// include both the name of the main request and the subrequest
	// using the format <main request>/<subrequest>.
	//
	// Multiple devices may have been allocated per request.
	//
	// +required
	Request string `json:"request" protobuf:"bytes,1,name=request"`

	// Driver specifies the name of the DRA driver whose kubelet
	// plugin should be invoked to process the allocation once the claim is
	// needed on a node.
	//
	// Must be a DNS subdomain and should end with a DNS domain owned by the
	// vendor of the driver. It should use only lower case characters.
	//
	// +required
	// +k8s:alpha(since: "1.36")=+k8s:format=k8s-long-name-caseless
	// +k8s:alpha(since: "1.36")=+k8s:required
	// +k8s:alpha(since: "1.36")=+k8s:maxLength=63
	Driver string `json:"driver" protobuf:"bytes,2,name=driver"`

	// This name together with the driver name and the device name field
	// identify which device was allocated (`<driver name>/<pool name>/<device name>`).
	//
	// Must not be longer than 253 characters and may contain one or more
	// DNS sub-domains separated by slashes.
	//
	// +required
	// +k8s:alpha(since: "1.36")=+k8s:required
	// +k8s:alpha(since: "1.36")=+k8s:format=k8s-resource-pool-name
	Pool string `json:"pool" protobuf:"bytes,3,name=pool"`

	// Device references one device instance via its name in the driver's
	// resource pool. It must be a DNS label.
	//
	// +required
	Device string `json:"device" protobuf:"bytes,4,name=device"`

	// AdminAccess indicates that this device was allocated for
	// administrative access. See the corresponding request field
	// for a definition of mode.
	//
	// Admin access is disabled if this field is unset or
	// set to false, otherwise it is enabled.
	//
	// +optional
	// +featureGate=DRAAdminAccess
	AdminAccess *bool `json:"adminAccess,omitempty" protobuf:"bytes,5,opt,name=adminAccess"`

	// A copy of all tolerations specified in the request at the time
	// when the device got allocated.
	//
	// The maximum number of tolerations is 16.
	//
	// This is a beta field and requires enabling the DRADeviceTaints
	// feature gate.
	//
	// +optional
	// +listType=atomic
	// +featureGate=DRADeviceTaints
	// +k8s:alpha(since: "1.36")=+k8s:optional
	Tolerations []DeviceToleration `json:"tolerations,omitempty" protobuf:"bytes,6,opt,name=tolerations"`

	// BindingConditions contains a copy of the BindingConditions
	// from the corresponding ResourceSlice at the time of allocation.
	//
	// This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
	// feature gates.
	//
	// +optional
	// +listType=atomic
	// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=4
	BindingConditions []string `json:"bindingConditions,omitempty" protobuf:"bytes,7,rep,name=bindingConditions"`

	// BindingFailureConditions contains a copy of the BindingFailureConditions
	// from the corresponding ResourceSlice at the time of allocation.
	//
	// This is a beta field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus
	// feature gates.
	//
	// +optional
	// +listType=atomic
	// +featureGate=DRADeviceBindingConditions,DRAResourceClaimDeviceStatus
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=4
	BindingFailureConditions []string `json:"bindingFailureConditions,omitempty" protobuf:"bytes,8,rep,name=bindingFailureConditions"`

	// ShareID uniquely identifies an individual allocation share of the device,
	// used when the device supports multiple simultaneous allocations.
	// It serves as an additional map key to differentiate concurrent shares
	// of the same device.
	//
	// +optional
	// +featureGate=DRAConsumableCapacity
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:format=k8s-uuid
	ShareID *types.UID `json:"shareID,omitempty" protobuf:"bytes,9,opt,name=shareID"`

	// ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request.
	// The consumed amount may differ from the requested amount: it is rounded up to the nearest valid
	// value based on the device’s requestPolicy if applicable (i.e., may not be less than the requested amount).
	//
	// The total consumed capacity for each device must not exceed the DeviceCapacity's Value.
	//
	// This field is populated only for devices that allow multiple allocations.
	// All capacity entries are included, even if the consumed amount is zero.
	//
	// +optional
	// +featureGate=DRAConsumableCapacity
	ConsumedCapacity map[QualifiedName]resource.Quantity `json:"consumedCapacity,omitempty" protobuf:"bytes,10,rep,name=consumedCapacity"`
}

DeviceRequestAllocationResult contains the allocation result for one request.

func (*DeviceRequestAllocationResult) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceRequestAllocationResult.

func (*DeviceRequestAllocationResult) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceRequestAllocationResult) Marshal

func (m *DeviceRequestAllocationResult) Marshal() (dAtA []byte, err error)

func (*DeviceRequestAllocationResult) MarshalTo

func (m *DeviceRequestAllocationResult) MarshalTo(dAtA []byte) (int, error)

func (*DeviceRequestAllocationResult) MarshalToSizedBuffer

func (m *DeviceRequestAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceRequestAllocationResult) OpenAPIModelName

func (in DeviceRequestAllocationResult) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceRequestAllocationResult) Reset

func (m *DeviceRequestAllocationResult) Reset()

func (*DeviceRequestAllocationResult) Size

func (m *DeviceRequestAllocationResult) Size() (n int)

func (*DeviceRequestAllocationResult) String

func (this *DeviceRequestAllocationResult) String() string

func (DeviceRequestAllocationResult) SwaggerDoc

func (DeviceRequestAllocationResult) SwaggerDoc() map[string]string

func (*DeviceRequestAllocationResult) Unmarshal

func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error

type DeviceSelector

type DeviceSelector struct {
	// CEL contains a CEL expression for selecting a device.
	//
	// +optional
	// +oneOf=SelectorType
	CEL *CELDeviceSelector `json:"cel,omitempty" protobuf:"bytes,1,opt,name=cel"`
}

DeviceSelector must have exactly one field set.

func (*DeviceSelector) DeepCopy

func (in *DeviceSelector) DeepCopy() *DeviceSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSelector.

func (*DeviceSelector) DeepCopyInto

func (in *DeviceSelector) DeepCopyInto(out *DeviceSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceSelector) Marshal

func (m *DeviceSelector) Marshal() (dAtA []byte, err error)

func (*DeviceSelector) MarshalTo

func (m *DeviceSelector) MarshalTo(dAtA []byte) (int, error)

func (*DeviceSelector) MarshalToSizedBuffer

func (m *DeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceSelector) OpenAPIModelName

func (in DeviceSelector) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceSelector) Reset

func (m *DeviceSelector) Reset()

func (*DeviceSelector) Size

func (m *DeviceSelector) Size() (n int)

func (*DeviceSelector) String

func (this *DeviceSelector) String() string

func (DeviceSelector) SwaggerDoc

func (DeviceSelector) SwaggerDoc() map[string]string

func (*DeviceSelector) Unmarshal

func (m *DeviceSelector) Unmarshal(dAtA []byte) error

type DeviceSubRequest

type DeviceSubRequest struct {
	// Name can be used to reference this subrequest in the list of constraints
	// or the list of configurations for the claim. References must use the
	// format <main request>/<subrequest>.
	//
	// Must be a DNS label.
	//
	// +required
	Name string `json:"name" protobuf:"bytes,1,name=name"`

	// DeviceClassName references a specific DeviceClass, which can define
	// additional configuration and selectors to be inherited by this
	// subrequest.
	//
	// A class is required. Which classes are available depends on the cluster.
	//
	// Administrators may use this to restrict which devices may get
	// requested by only installing classes with selectors for permitted
	// devices. If users are free to request anything without restrictions,
	// then administrators can create an empty DeviceClass for users
	// to reference.
	//
	// +required
	// +k8s:alpha(since: "1.36")=+k8s:required
	// +k8s:alpha(since: "1.36")=+k8s:format=k8s-long-name
	DeviceClassName string `json:"deviceClassName" protobuf:"bytes,2,name=deviceClassName"`

	// Selectors define criteria which must be satisfied by a specific
	// device in order for that device to be considered for this
	// subrequest. All selectors must be satisfied for a device to be
	// considered.
	//
	// +optional
	// +listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
	Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,3,name=selectors"`

	// AllocationMode and its related fields define how devices are allocated
	// to satisfy this subrequest. Supported values are:
	//
	// - ExactCount: This request is for a specific number of devices.
	//   This is the default. The exact number is provided in the
	//   count field.
	//
	// - All: This subrequest is for all of the matching devices in a pool.
	//   Allocation will fail if some devices are already allocated,
	//   unless adminAccess is requested.
	//
	// If AllocationMode is not specified, the default mode is ExactCount. If
	// the mode is ExactCount and count is not specified, the default count is
	// one. Any other subrequests must specify this field.
	//
	// More modes may get added in the future. Clients must refuse to handle
	// requests with unknown modes.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	AllocationMode DeviceAllocationMode `json:"allocationMode,omitempty" protobuf:"bytes,4,opt,name=allocationMode"`

	// Count is used only when the count mode is "ExactCount". Must be greater than zero.
	// If AllocationMode is ExactCount and this field is not specified, the default is one.
	//
	// +optional
	// +oneOf=AllocationMode
	Count int64 `json:"count,omitempty" protobuf:"bytes,5,opt,name=count"`

	// If specified, the request's tolerations.
	//
	// Tolerations for NoSchedule are required to allocate a
	// device which has a taint with that effect. The same applies
	// to NoExecute.
	//
	// In addition, should any of the allocated devices get tainted
	// with NoExecute after allocation and that effect is not tolerated,
	// then all pods consuming the ResourceClaim get deleted to evict
	// them. The scheduler will not let new pods reserve the claim while
	// it has these tainted devices. Once all pods are evicted, the
	// claim will get deallocated.
	//
	// The maximum number of tolerations is 16.
	//
	// This is a beta field and requires enabling the DRADeviceTaints
	// feature gate.
	//
	// +optional
	// +listType=atomic
	// +featureGate=DRADeviceTaints
	// +k8s:alpha(since: "1.36")=+k8s:optional
	Tolerations []DeviceToleration `json:"tolerations,omitempty" protobuf:"bytes,6,opt,name=tolerations"`

	// Capacity define resource requirements against each capacity.
	//
	// If this field is unset and the device supports multiple allocations,
	// the default value will be applied to each capacity according to requestPolicy.
	// For the capacity that has no requestPolicy, default is the full capacity value.
	//
	// Applies to each device allocation.
	// If Count > 1,
	// the request fails if there aren't enough devices that meet the requirements.
	// If AllocationMode is set to All,
	// the request fails if there are devices that otherwise match the request,
	// and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.
	//
	// +optional
	// +featureGate=DRAConsumableCapacity
	Capacity *CapacityRequirements `json:"capacity,omitempty" protobuf:"bytes,7,opt,name=capacity"`
}

DeviceSubRequest describes a request for device provided in the claim.spec.devices.requests[].firstAvailable array. Each is typically a request for a single resource like a device, but can also ask for several identical devices.

DeviceSubRequest is similar to ExactDeviceRequest, but doesn't expose the AdminAccess field as that one is only supported when requesting a specific device.

func (*DeviceSubRequest) DeepCopy

func (in *DeviceSubRequest) DeepCopy() *DeviceSubRequest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSubRequest.

func (*DeviceSubRequest) DeepCopyInto

func (in *DeviceSubRequest) DeepCopyInto(out *DeviceSubRequest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceSubRequest) Marshal

func (m *DeviceSubRequest) Marshal() (dAtA []byte, err error)

func (*DeviceSubRequest) MarshalTo

func (m *DeviceSubRequest) MarshalTo(dAtA []byte) (int, error)

func (*DeviceSubRequest) MarshalToSizedBuffer

func (m *DeviceSubRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceSubRequest) OpenAPIModelName

func (in DeviceSubRequest) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceSubRequest) Reset

func (m *DeviceSubRequest) Reset()

func (*DeviceSubRequest) Size

func (m *DeviceSubRequest) Size() (n int)

func (*DeviceSubRequest) String

func (this *DeviceSubRequest) String() string

func (DeviceSubRequest) SwaggerDoc

func (DeviceSubRequest) SwaggerDoc() map[string]string

func (*DeviceSubRequest) Unmarshal

func (m *DeviceSubRequest) Unmarshal(dAtA []byte) error

type DeviceTaint

type DeviceTaint struct {
	// The taint key to be applied to a device.
	// Must be a label name.
	//
	// +required
	Key string `json:"key" protobuf:"bytes,1,name=key"`

	// The taint value corresponding to the taint key.
	// Must be a label value.
	//
	// +optional
	Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`

	// The effect of the taint on claims that do not tolerate the taint
	// and through such claims on the pods using them.
	//
	// Valid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for
	// nodes is not valid here. More effects may get added in the future.
	// Consumers must treat unknown effects like None.
	//
	// +required
	// +k8s:alpha(since: "1.36")=+k8s:required
	Effect DeviceTaintEffect `json:"effect" protobuf:"bytes,3,name=effect,casttype=DeviceTaintEffect"`

	// TimeAdded represents the time at which the taint was added or
	// (only in a DeviceTaintRule) the effect was modified.
	// Added automatically during create or update if not set.
	//
	// In addition, in a DeviceTaintRule a value provided during
	// an update gets replaced with the current time if the provided
	// value is the same as the old one and the new effect is different.
	// Changing the key and/or value while keeping the effect unchanged
	// is possible and does not update the time stamp because the eviction
	// which uses it is either already started (NoExecute) or
	// not started yet (NoEffect, NoSchedule).
	//
	// +optional
	TimeAdded *metav1.Time `json:"timeAdded,omitempty" protobuf:"bytes,4,opt,name=timeAdded"`
}

The device this taint is attached to has the "effect" on any claim which does not tolerate the taint and, through the claim, to pods using the claim.

+protobuf.options.(gogoproto.goproto_stringer)=false

func (*DeviceTaint) DeepCopy

func (in *DeviceTaint) DeepCopy() *DeviceTaint

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceTaint.

func (*DeviceTaint) DeepCopyInto

func (in *DeviceTaint) DeepCopyInto(out *DeviceTaint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceTaint) Marshal

func (m *DeviceTaint) Marshal() (dAtA []byte, err error)

func (*DeviceTaint) MarshalTo

func (m *DeviceTaint) MarshalTo(dAtA []byte) (int, error)

func (*DeviceTaint) MarshalToSizedBuffer

func (m *DeviceTaint) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceTaint) OpenAPIModelName

func (in DeviceTaint) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceTaint) Reset

func (m *DeviceTaint) Reset()

func (*DeviceTaint) Size

func (m *DeviceTaint) Size() (n int)

func (DeviceTaint) String

func (t DeviceTaint) String() string

String converts to a string in the format '<key>=<value>:<effect>', '<key>=<value>:', '<key>:<effect>', or '<key>'.

func (DeviceTaint) SwaggerDoc

func (DeviceTaint) SwaggerDoc() map[string]string

func (*DeviceTaint) Unmarshal

func (m *DeviceTaint) Unmarshal(dAtA []byte) error

type DeviceTaintEffect

type DeviceTaintEffect string

+enum +k8s:alpha(since: "1.36")=+k8s:enum

const (
	// No effect, the taint is purely informational.
	DeviceTaintEffectNone DeviceTaintEffect = "None"

	// Do not allow new pods to schedule which use a tainted device unless they tolerate the taint,
	// but allow all pods submitted to Kubelet without going through the scheduler
	// to start, and allow all already-running pods to continue running.
	DeviceTaintEffectNoSchedule DeviceTaintEffect = "NoSchedule"

	// Evict any already-running pods that do not tolerate the device taint.
	DeviceTaintEffectNoExecute DeviceTaintEffect = "NoExecute"
)

type DeviceToleration

type DeviceToleration struct {
	// Key is the taint key that the toleration applies to. Empty means match all taint keys.
	// If the key is empty, operator must be Exists; this combination means to match all values and all keys.
	// Must be a label name.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:format=k8s-label-key
	Key string `json:"key,omitempty" protobuf:"bytes,1,opt,name=key"`

	// Operator represents a key's relationship to the value.
	// Valid operators are Exists and Equal. Defaults to Equal.
	// Exists is equivalent to wildcard for value, so that a ResourceClaim can
	// tolerate all taints of a particular category.
	//
	// +optional
	// +default="Equal"
	// +k8s:alpha(since: "1.36")=+k8s:optional
	Operator DeviceTolerationOperator `json:"operator,omitempty" protobuf:"bytes,2,opt,name=operator,casttype=DeviceTolerationOperator"`

	// Value is the taint value the toleration matches to.
	// If the operator is Exists, the value must be empty, otherwise just a regular string.
	// Must be a label value.
	//
	// +optional
	Value string `json:"value,omitempty" protobuf:"bytes,3,opt,name=value"`

	// Effect indicates the taint effect to match. Empty means match all taint effects.
	// When specified, allowed values are NoSchedule and NoExecute.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	Effect DeviceTaintEffect `json:"effect,omitempty" protobuf:"bytes,4,opt,name=effect,casttype=DeviceTaintEffect"`

	// TolerationSeconds represents the period of time the toleration (which must be
	// of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
	// it is not set, which means tolerate the taint forever (do not evict). Zero and
	// negative values will be treated as 0 (evict immediately) by the system.
	// If larger than zero, the time when the pod needs to be evicted is calculated as <time when
	// taint was adedd> + <toleration seconds>.
	//
	// +optional
	TolerationSeconds *int64 `json:"tolerationSeconds,omitempty" protobuf:"varint,5,opt,name=tolerationSeconds"`
}

The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.

func (*DeviceToleration) DeepCopy

func (in *DeviceToleration) DeepCopy() *DeviceToleration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceToleration.

func (*DeviceToleration) DeepCopyInto

func (in *DeviceToleration) DeepCopyInto(out *DeviceToleration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DeviceToleration) Marshal

func (m *DeviceToleration) Marshal() (dAtA []byte, err error)

func (*DeviceToleration) MarshalTo

func (m *DeviceToleration) MarshalTo(dAtA []byte) (int, error)

func (*DeviceToleration) MarshalToSizedBuffer

func (m *DeviceToleration) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (DeviceToleration) OpenAPIModelName

func (in DeviceToleration) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*DeviceToleration) Reset

func (m *DeviceToleration) Reset()

func (*DeviceToleration) Size

func (m *DeviceToleration) Size() (n int)

func (*DeviceToleration) String

func (this *DeviceToleration) String() string

func (DeviceToleration) SwaggerDoc

func (DeviceToleration) SwaggerDoc() map[string]string

func (*DeviceToleration) Unmarshal

func (m *DeviceToleration) Unmarshal(dAtA []byte) error

type DeviceTolerationOperator

type DeviceTolerationOperator string

A toleration operator is the set of operators that can be used in a toleration.

+enum +k8s:alpha(since: "1.36")=+k8s:enum

const (
	DeviceTolerationOpExists DeviceTolerationOperator = "Exists"
	DeviceTolerationOpEqual  DeviceTolerationOperator = "Equal"
)

type ExactDeviceRequest

type ExactDeviceRequest struct {
	// DeviceClassName references a specific DeviceClass, which can define
	// additional configuration and selectors to be inherited by this
	// request.
	//
	// A DeviceClassName is required.
	//
	// Administrators may use this to restrict which devices may get
	// requested by only installing classes with selectors for permitted
	// devices. If users are free to request anything without restrictions,
	// then administrators can create an empty DeviceClass for users
	// to reference.
	//
	// +required
	DeviceClassName string `json:"deviceClassName" protobuf:"bytes,1,name=deviceClassName"`

	// Selectors define criteria which must be satisfied by a specific
	// device in order for that device to be considered for this
	// request. All selectors must be satisfied for a device to be
	// considered.
	//
	// +optional
	// +listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=32
	Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,2,name=selectors"`

	// AllocationMode and its related fields define how devices are allocated
	// to satisfy this request. Supported values are:
	//
	// - ExactCount: This request is for a specific number of devices.
	//   This is the default. The exact number is provided in the
	//   count field.
	//
	// - All: This request is for all of the matching devices in a pool.
	//   At least one device must exist on the node for the allocation to succeed.
	//   Allocation will fail if some devices are already allocated,
	//   unless adminAccess is requested.
	//
	// If AllocationMode is not specified, the default mode is ExactCount. If
	// the mode is ExactCount and count is not specified, the default count is
	// one. Any other requests must specify this field.
	//
	// More modes may get added in the future. Clients must refuse to handle
	// requests with unknown modes.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	AllocationMode DeviceAllocationMode `json:"allocationMode,omitempty" protobuf:"bytes,3,opt,name=allocationMode"`

	// Count is used only when the count mode is "ExactCount". Must be greater than zero.
	// If AllocationMode is ExactCount and this field is not specified, the default is one.
	//
	// +optional
	// +oneOf=AllocationMode
	Count int64 `json:"count,omitempty" protobuf:"bytes,4,opt,name=count"`

	// AdminAccess indicates that this is a claim for administrative access
	// to the device(s). Claims with AdminAccess are expected to be used for
	// monitoring or other management services for a device.  They ignore
	// all ordinary claims to the device with respect to access modes and
	// any resource allocations.
	//
	// Admin access is disabled if this field is unset or
	// set to false, otherwise it is enabled.
	//
	// +optional
	// +featureGate=DRAAdminAccess
	AdminAccess *bool `json:"adminAccess,omitempty" protobuf:"bytes,5,opt,name=adminAccess"`

	// If specified, the request's tolerations.
	//
	// Tolerations for NoSchedule are required to allocate a
	// device which has a taint with that effect. The same applies
	// to NoExecute.
	//
	// In addition, should any of the allocated devices get tainted
	// with NoExecute after allocation and that effect is not tolerated,
	// then all pods consuming the ResourceClaim get deleted to evict
	// them. The scheduler will not let new pods reserve the claim while
	// it has these tainted devices. Once all pods are evicted, the
	// claim will get deallocated.
	//
	// The maximum number of tolerations is 16.
	//
	// This is a beta field and requires enabling the DRADeviceTaints
	// feature gate.
	//
	// +optional
	// +listType=atomic
	// +featureGate=DRADeviceTaints
	// +k8s:alpha(since: "1.36")=+k8s:optional
	Tolerations []DeviceToleration `json:"tolerations,omitempty" protobuf:"bytes,6,opt,name=tolerations"`

	// Capacity define resource requirements against each capacity.
	//
	// If this field is unset and the device supports multiple allocations,
	// the default value will be applied to each capacity according to requestPolicy.
	// For the capacity that has no requestPolicy, default is the full capacity value.
	//
	// Applies to each device allocation.
	// If Count > 1,
	// the request fails if there aren't enough devices that meet the requirements.
	// If AllocationMode is set to All,
	// the request fails if there are devices that otherwise match the request,
	// and have this capacity, with a value >= the requested amount, but which cannot be allocated to this request.
	//
	// +optional
	// +featureGate=DRAConsumableCapacity
	Capacity *CapacityRequirements `json:"capacity,omitempty" protobuf:"bytes,7,opt,name=capacity"`
}

ExactDeviceRequest is a request for one or more identical devices.

func (*ExactDeviceRequest) DeepCopy

func (in *ExactDeviceRequest) DeepCopy() *ExactDeviceRequest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExactDeviceRequest.

func (*ExactDeviceRequest) DeepCopyInto

func (in *ExactDeviceRequest) DeepCopyInto(out *ExactDeviceRequest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExactDeviceRequest) Marshal

func (m *ExactDeviceRequest) Marshal() (dAtA []byte, err error)

func (*ExactDeviceRequest) MarshalTo

func (m *ExactDeviceRequest) MarshalTo(dAtA []byte) (int, error)

func (*ExactDeviceRequest) MarshalToSizedBuffer

func (m *ExactDeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ExactDeviceRequest) OpenAPIModelName

func (in ExactDeviceRequest) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*ExactDeviceRequest) Reset

func (m *ExactDeviceRequest) Reset()

func (*ExactDeviceRequest) Size

func (m *ExactDeviceRequest) Size() (n int)

func (*ExactDeviceRequest) String

func (this *ExactDeviceRequest) String() string

func (ExactDeviceRequest) SwaggerDoc

func (ExactDeviceRequest) SwaggerDoc() map[string]string

func (*ExactDeviceRequest) Unmarshal

func (m *ExactDeviceRequest) Unmarshal(dAtA []byte) error

type FullyQualifiedName

type FullyQualifiedName string

FullyQualifiedName is a QualifiedName where the domain is set. Format validation cannot be added to this type because one of its usages, DistinctAttribute, is validated conditionally. This conditional validation cannot be expressed declaratively.

type NetworkDeviceData

type NetworkDeviceData struct {
	// InterfaceName specifies the name of the network interface associated with
	// the allocated device. This might be the name of a physical or virtual
	// network interface being configured in the pod.
	//
	// Must not be longer than 256 bytes.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:maxBytes=256
	InterfaceName string `json:"interfaceName,omitempty" protobuf:"bytes,1,opt,name=interfaceName"`

	// IPs lists the network addresses assigned to the device's network interface.
	// This can include both IPv4 and IPv6 addresses.
	// The IPs are in the CIDR notation, which includes both the address and the
	// associated subnet mask.
	// e.g.: "192.0.2.5/24" for IPv4 and "2001:db8::5/64" for IPv6.
	//
	// +optional
	// +listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:unique=set
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=16
	IPs []string `json:"ips,omitempty" protobuf:"bytes,2,opt,name=ips"`

	// HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.
	//
	// Must not be longer than 128 bytes.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:maxBytes=128
	HardwareAddress string `json:"hardwareAddress,omitempty" protobuf:"bytes,3,opt,name=hardwareAddress"`
}

NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.

func (*NetworkDeviceData) DeepCopy

func (in *NetworkDeviceData) DeepCopy() *NetworkDeviceData

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDeviceData.

func (*NetworkDeviceData) DeepCopyInto

func (in *NetworkDeviceData) DeepCopyInto(out *NetworkDeviceData)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NetworkDeviceData) Marshal

func (m *NetworkDeviceData) Marshal() (dAtA []byte, err error)

func (*NetworkDeviceData) MarshalTo

func (m *NetworkDeviceData) MarshalTo(dAtA []byte) (int, error)

func (*NetworkDeviceData) MarshalToSizedBuffer

func (m *NetworkDeviceData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (NetworkDeviceData) OpenAPIModelName

func (in NetworkDeviceData) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*NetworkDeviceData) Reset

func (m *NetworkDeviceData) Reset()

func (*NetworkDeviceData) Size

func (m *NetworkDeviceData) Size() (n int)

func (*NetworkDeviceData) String

func (this *NetworkDeviceData) String() string

func (NetworkDeviceData) SwaggerDoc

func (NetworkDeviceData) SwaggerDoc() map[string]string

func (*NetworkDeviceData) Unmarshal

func (m *NetworkDeviceData) Unmarshal(dAtA []byte) error

type NodeAllocatableResourceMapping

type NodeAllocatableResourceMapping struct {
	// CapacityKey references a capacity name defined as a key in the
	// `spec.devices[*].capacity` map. When this field is set, the value associated with
	// this key in the `status.allocation.devices.results[*].consumedCapacity` map
	// (for a specific claim allocation) determines the base quantity for
	// the node allocatable resource. If `allocationMultiplier` is also set, it is
	// multiplied with the base quantity.
	// For example, if `spec.devices[*].capacity` has an entry "dra.example.com/memory": "128Gi",
	// and this field is set to "dra.example.com/memory", then for a claim allocation
	// that consumes { "dra.example.com/memory": "4Gi" } the base quantity for the
	// node allocatable resource mapping will be "4Gi", and `allocationMultiplier` should
	// be omitted or set to "1".
	// +optional
	CapacityKey *QualifiedName `json:"capacityKey,omitempty" protobuf:"bytes,1,opt,name=capacityKey"`

	// AllocationMultiplier is used as a multiplier for the allocated device count or the allocated capacity in the claim.
	// It defaults to 1 if not specified. How the field is used also depends on whether `capacityKey` is set.
	// 1.  If `capacityKey` is NOT set: `allocationMultiplier` multiplies the device count allocated to the claim.
	// 	   a. A DRA driver representing each CPU core as a device would have
	//        {ResourceName: "cpu", allocationMultiplier: "2"} in its
	//        `nodeAllocatableResourceMappings`. If 4 devices are allocated to the claim,
	// 		  4 * 2 CPUs would be considered as allocated and subtracted from the node's capacity.
	//     b. A GPU device that needs additional node memory per GPU allocation would
	//        have {ResourceName: "memory", allocationMultiplier: "2Gi"}.  Each allocated
	// 		  GPU device instance of this type will account for 2Gi of memory.
	//
	// 2.  If `capacityKey` IS set: `allocationMultiplier` is multiplied by the amount of that capacity consumed.
	// 	   The final node allocatable resource amount is `consumedCapacity[capacityKey]` * `allocationMultiplier`.
	//     For example, if a Device's capacity "dra.example.com/cores" is consumed,
	//     and each "core" provides 2 "cpu"s, the mapping would be:
	//     {ResourceName: "cpu", capacityKey: "dra.example.com/cores", allocationMultiplier: "2"}.
	//     If a claim consumes 8 "dra.example.com/cores", the CPU footprint is 8 * 2 = 16.
	// +optional
	AllocationMultiplier *resource.Quantity `json:"allocationMultiplier,omitempty" protobuf:"bytes,2,opt,name=allocationMultiplier"`
}

NodeAllocatableResourceMapping defines the translation between the DRA device/capacity units requested to the corresponding quantity of the node allocatable resource.

func (*NodeAllocatableResourceMapping) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeAllocatableResourceMapping.

func (*NodeAllocatableResourceMapping) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeAllocatableResourceMapping) Marshal

func (m *NodeAllocatableResourceMapping) Marshal() (dAtA []byte, err error)

func (*NodeAllocatableResourceMapping) MarshalTo

func (m *NodeAllocatableResourceMapping) MarshalTo(dAtA []byte) (int, error)

func (*NodeAllocatableResourceMapping) MarshalToSizedBuffer

func (m *NodeAllocatableResourceMapping) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (NodeAllocatableResourceMapping) OpenAPIModelName

func (in NodeAllocatableResourceMapping) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*NodeAllocatableResourceMapping) Reset

func (m *NodeAllocatableResourceMapping) Reset()

func (*NodeAllocatableResourceMapping) Size

func (m *NodeAllocatableResourceMapping) Size() (n int)

func (*NodeAllocatableResourceMapping) String

func (this *NodeAllocatableResourceMapping) String() string

func (NodeAllocatableResourceMapping) SwaggerDoc

func (NodeAllocatableResourceMapping) SwaggerDoc() map[string]string

func (*NodeAllocatableResourceMapping) Unmarshal

func (m *NodeAllocatableResourceMapping) Unmarshal(dAtA []byte) error

type OpaqueDeviceConfiguration

type OpaqueDeviceConfiguration struct {
	// Driver is used to determine which kubelet plugin needs
	// to be passed these configuration parameters.
	//
	// An admission policy provided by the driver developer could use this
	// to decide whether it needs to validate them.
	//
	// Must be a DNS subdomain and should end with a DNS domain owned by the
	// vendor of the driver. It should use only lower case characters.
	//
	// +required
	// +k8s:alpha(since: "1.36")=+k8s:required
	// +k8s:alpha(since: "1.36")=+k8s:format=k8s-long-name-caseless
	// +k8s:alpha(since: "1.36")=+k8s:maxLength=63
	Driver string `json:"driver" protobuf:"bytes,1,name=driver"`

	// Parameters can contain arbitrary data. It is the responsibility of
	// the driver developer to handle validation and versioning. Typically this
	// includes self-identification and a version ("kind" + "apiVersion" for
	// Kubernetes types), with conversion between different versions.
	//
	// The length of the raw data must be smaller or equal to 10 Ki.
	//
	// +required
	Parameters runtime.RawExtension `json:"parameters" protobuf:"bytes,2,name=parameters"`
}

OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.

func (*OpaqueDeviceConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpaqueDeviceConfiguration.

func (*OpaqueDeviceConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OpaqueDeviceConfiguration) Marshal

func (m *OpaqueDeviceConfiguration) Marshal() (dAtA []byte, err error)

func (*OpaqueDeviceConfiguration) MarshalTo

func (m *OpaqueDeviceConfiguration) MarshalTo(dAtA []byte) (int, error)

func (*OpaqueDeviceConfiguration) MarshalToSizedBuffer

func (m *OpaqueDeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (OpaqueDeviceConfiguration) OpenAPIModelName

func (in OpaqueDeviceConfiguration) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*OpaqueDeviceConfiguration) Reset

func (m *OpaqueDeviceConfiguration) Reset()

func (*OpaqueDeviceConfiguration) Size

func (m *OpaqueDeviceConfiguration) Size() (n int)

func (*OpaqueDeviceConfiguration) String

func (this *OpaqueDeviceConfiguration) String() string

func (OpaqueDeviceConfiguration) SwaggerDoc

func (OpaqueDeviceConfiguration) SwaggerDoc() map[string]string

func (*OpaqueDeviceConfiguration) Unmarshal

func (m *OpaqueDeviceConfiguration) Unmarshal(dAtA []byte) error

type QualifiedName

type QualifiedName string

QualifiedName is the name of a device attribute or capacity.

Attributes and capacities are defined either by the owner of the specific driver (usually the vendor) or by some 3rd party (e.g. the Kubernetes project). Because they are sometimes compared across devices, a given name is expected to mean the same thing and have the same type on all devices.

Names must be either a C identifier (e.g. "theName") or a DNS subdomain followed by a slash ("/") followed by a C identifier (e.g. "dra.example.com/theName"). Names which do not include the domain prefix are assumed to be part of the driver's domain. Attributes or capacities defined by 3rd parties must include the domain prefix.

The maximum length for the DNS subdomain is 63 characters (same as for driver names) and the maximum length of the C identifier is 32.

type ResourceClaim

type ResourceClaim struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Spec describes what is being requested and how to configure it.
	// The spec is immutable.
	// +k8s:alpha(since: "1.36")=+k8s:immutable
	Spec ResourceClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"`

	// Status describes whether the claim is ready to use and what has been allocated.
	// +optional
	Status ResourceClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.

func (*ResourceClaim) APILifecycleIntroduced

func (in *ResourceClaim) APILifecycleIntroduced() (major, minor int)

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 (*ResourceClaim) DeepCopy

func (in *ResourceClaim) DeepCopy() *ResourceClaim

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaim.

func (*ResourceClaim) DeepCopyInto

func (in *ResourceClaim) DeepCopyInto(out *ResourceClaim)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceClaim) DeepCopyObject

func (in *ResourceClaim) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ResourceClaim) Marshal

func (m *ResourceClaim) Marshal() (dAtA []byte, err error)

func (*ResourceClaim) MarshalTo

func (m *ResourceClaim) MarshalTo(dAtA []byte) (int, error)

func (*ResourceClaim) MarshalToSizedBuffer

func (m *ResourceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ResourceClaim) OpenAPIModelName

func (in ResourceClaim) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*ResourceClaim) Reset

func (m *ResourceClaim) Reset()

func (*ResourceClaim) Size

func (m *ResourceClaim) Size() (n int)

func (*ResourceClaim) String

func (this *ResourceClaim) String() string

func (ResourceClaim) SwaggerDoc

func (ResourceClaim) SwaggerDoc() map[string]string

func (*ResourceClaim) Unmarshal

func (m *ResourceClaim) Unmarshal(dAtA []byte) error

type ResourceClaimConsumerReference

type ResourceClaimConsumerReference struct {
	// APIGroup is the group for the resource being referenced. It is
	// empty for the core API. This matches the group in the APIVersion
	// that is used when creating the resources.
	// +optional
	APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,1,opt,name=apiGroup"`
	// Resource is the type of resource being referenced, for example "pods".
	// +required
	Resource string `json:"resource" protobuf:"bytes,3,name=resource"`
	// Name is the name of resource being referenced.
	// +required
	Name string `json:"name" protobuf:"bytes,4,name=name"`
	// UID identifies exactly one incarnation of the resource.
	// +required
	UID types.UID `json:"uid" protobuf:"bytes,5,name=uid"`
}

ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.

func (*ResourceClaimConsumerReference) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimConsumerReference.

func (*ResourceClaimConsumerReference) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceClaimConsumerReference) Marshal

func (m *ResourceClaimConsumerReference) Marshal() (dAtA []byte, err error)

func (*ResourceClaimConsumerReference) MarshalTo

func (m *ResourceClaimConsumerReference) MarshalTo(dAtA []byte) (int, error)

func (*ResourceClaimConsumerReference) MarshalToSizedBuffer

func (m *ResourceClaimConsumerReference) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ResourceClaimConsumerReference) OpenAPIModelName

func (in ResourceClaimConsumerReference) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*ResourceClaimConsumerReference) Reset

func (m *ResourceClaimConsumerReference) Reset()

func (*ResourceClaimConsumerReference) Size

func (m *ResourceClaimConsumerReference) Size() (n int)

func (*ResourceClaimConsumerReference) String

func (this *ResourceClaimConsumerReference) String() string

func (ResourceClaimConsumerReference) SwaggerDoc

func (ResourceClaimConsumerReference) SwaggerDoc() map[string]string

func (*ResourceClaimConsumerReference) Unmarshal

func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error

type ResourceClaimList

type ResourceClaimList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Items is the list of resource claims.
	Items []ResourceClaim `json:"items" protobuf:"bytes,2,rep,name=items"`
}

ResourceClaimList is a collection of claims.

func (*ResourceClaimList) APILifecycleIntroduced

func (in *ResourceClaimList) APILifecycleIntroduced() (major, minor int)

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 (*ResourceClaimList) DeepCopy

func (in *ResourceClaimList) DeepCopy() *ResourceClaimList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimList.

func (*ResourceClaimList) DeepCopyInto

func (in *ResourceClaimList) DeepCopyInto(out *ResourceClaimList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceClaimList) DeepCopyObject

func (in *ResourceClaimList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ResourceClaimList) Marshal

func (m *ResourceClaimList) Marshal() (dAtA []byte, err error)

func (*ResourceClaimList) MarshalTo

func (m *ResourceClaimList) MarshalTo(dAtA []byte) (int, error)

func (*ResourceClaimList) MarshalToSizedBuffer

func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ResourceClaimList) OpenAPIModelName

func (in ResourceClaimList) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*ResourceClaimList) Reset

func (m *ResourceClaimList) Reset()

func (*ResourceClaimList) Size

func (m *ResourceClaimList) Size() (n int)

func (*ResourceClaimList) String

func (this *ResourceClaimList) String() string

func (ResourceClaimList) SwaggerDoc

func (ResourceClaimList) SwaggerDoc() map[string]string

func (*ResourceClaimList) Unmarshal

func (m *ResourceClaimList) Unmarshal(dAtA []byte) error

type ResourceClaimSpec

type ResourceClaimSpec struct {
	// Devices defines how to request devices.
	//
	// +optional
	Devices DeviceClaim `json:"devices" protobuf:"bytes,1,name=devices"`
}

ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.

func (*ResourceClaimSpec) DeepCopy

func (in *ResourceClaimSpec) DeepCopy() *ResourceClaimSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimSpec.

func (*ResourceClaimSpec) DeepCopyInto

func (in *ResourceClaimSpec) DeepCopyInto(out *ResourceClaimSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceClaimSpec) Marshal

func (m *ResourceClaimSpec) Marshal() (dAtA []byte, err error)

func (*ResourceClaimSpec) MarshalTo

func (m *ResourceClaimSpec) MarshalTo(dAtA []byte) (int, error)

func (*ResourceClaimSpec) MarshalToSizedBuffer

func (m *ResourceClaimSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ResourceClaimSpec) OpenAPIModelName

func (in ResourceClaimSpec) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*ResourceClaimSpec) Reset

func (m *ResourceClaimSpec) Reset()

func (*ResourceClaimSpec) Size

func (m *ResourceClaimSpec) Size() (n int)

func (*ResourceClaimSpec) String

func (this *ResourceClaimSpec) String() string

func (ResourceClaimSpec) SwaggerDoc

func (ResourceClaimSpec) SwaggerDoc() map[string]string

func (*ResourceClaimSpec) Unmarshal

func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error

type ResourceClaimStatus

type ResourceClaimStatus struct {
	// Allocation is set once the claim has been allocated successfully.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:update=NoModify
	Allocation *AllocationResult `json:"allocation,omitempty" protobuf:"bytes,1,opt,name=allocation"`

	// ReservedFor indicates which entities are currently allowed to use
	// the claim. A Pod which references a ResourceClaim which is not
	// reserved for that Pod will not be started. A claim that is in
	// use or might be in use because it has been reserved must not get
	// deallocated.
	//
	// In a cluster with multiple scheduler instances, two pods might get
	// scheduled concurrently by different schedulers. When they reference
	// the same ResourceClaim which already has reached its maximum number
	// of consumers, only one pod can be scheduled.
	//
	// Both schedulers try to add their pod to the claim.status.reservedFor
	// field, but only the update that reaches the API server first gets
	// stored. The other one fails with an error and the scheduler
	// which issued it knows that it must put the pod back into the queue,
	// waiting for the ResourceClaim to become usable again.
	//
	// There can be at most 256 such reservations. This may get increased in
	// the future, but not reduced.
	//
	// +optional
	// +listType=map
	// +listMapKey=uid
	// +patchStrategy=merge
	// +patchMergeKey=uid
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +k8s:alpha(since: "1.36")=+k8s:listType=map
	// +k8s:alpha(since: "1.36")=+k8s:listMapKey=uid
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=256
	ReservedFor []ResourceClaimConsumerReference `json:"reservedFor,omitempty" protobuf:"bytes,2,opt,name=reservedFor" patchStrategy:"merge" patchMergeKey:"uid"`

	// Devices contains the status of each device allocated for this
	// claim, as reported by the driver. This can include driver-specific
	// information. Entries are owned by their respective drivers.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +listType=map
	// +listMapKey=driver
	// +listMapKey=device
	// +listMapKey=pool
	// +listMapKey=shareID
	// +featureGate=DRAResourceClaimDeviceStatus
	// +k8s:alpha(since: "1.36")=+k8s:listType=map
	// +k8s:alpha(since: "1.36")=+k8s:listMapKey=driver
	// +k8s:alpha(since: "1.36")=+k8s:listMapKey=device
	// +k8s:alpha(since: "1.36")=+k8s:listMapKey=pool
	// +k8s:alpha(since: "1.36")=+k8s:listMapKey=shareID
	Devices []AllocatedDeviceStatus `json:"devices,omitempty" protobuf:"bytes,4,opt,name=devices"`
}

ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.

func (*ResourceClaimStatus) DeepCopy

func (in *ResourceClaimStatus) DeepCopy() *ResourceClaimStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimStatus.

func (*ResourceClaimStatus) DeepCopyInto

func (in *ResourceClaimStatus) DeepCopyInto(out *ResourceClaimStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceClaimStatus) Marshal

func (m *ResourceClaimStatus) Marshal() (dAtA []byte, err error)

func (*ResourceClaimStatus) MarshalTo

func (m *ResourceClaimStatus) MarshalTo(dAtA []byte) (int, error)

func (*ResourceClaimStatus) MarshalToSizedBuffer

func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ResourceClaimStatus) OpenAPIModelName

func (in ResourceClaimStatus) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*ResourceClaimStatus) Reset

func (m *ResourceClaimStatus) Reset()

func (*ResourceClaimStatus) Size

func (m *ResourceClaimStatus) Size() (n int)

func (*ResourceClaimStatus) String

func (this *ResourceClaimStatus) String() string

func (ResourceClaimStatus) SwaggerDoc

func (ResourceClaimStatus) SwaggerDoc() map[string]string

func (*ResourceClaimStatus) Unmarshal

func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error

type ResourceClaimTemplate

type ResourceClaimTemplate struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Describes the ResourceClaim that is to be generated.
	//
	// This field is immutable. A ResourceClaim will get created by the
	// control plane for a Pod when needed and then not get updated
	// anymore.
	Spec ResourceClaimTemplateSpec `json:"spec" protobuf:"bytes,2,name=spec"`
}

ResourceClaimTemplate is used to produce ResourceClaim objects.

func (*ResourceClaimTemplate) APILifecycleIntroduced

func (in *ResourceClaimTemplate) APILifecycleIntroduced() (major, minor int)

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 (*ResourceClaimTemplate) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplate.

func (*ResourceClaimTemplate) DeepCopyInto

func (in *ResourceClaimTemplate) DeepCopyInto(out *ResourceClaimTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceClaimTemplate) DeepCopyObject

func (in *ResourceClaimTemplate) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ResourceClaimTemplate) Marshal

func (m *ResourceClaimTemplate) Marshal() (dAtA []byte, err error)

func (*ResourceClaimTemplate) MarshalTo

func (m *ResourceClaimTemplate) MarshalTo(dAtA []byte) (int, error)

func (*ResourceClaimTemplate) MarshalToSizedBuffer

func (m *ResourceClaimTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ResourceClaimTemplate) OpenAPIModelName

func (in ResourceClaimTemplate) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*ResourceClaimTemplate) Reset

func (m *ResourceClaimTemplate) Reset()

func (*ResourceClaimTemplate) Size

func (m *ResourceClaimTemplate) Size() (n int)

func (*ResourceClaimTemplate) String

func (this *ResourceClaimTemplate) String() string

func (ResourceClaimTemplate) SwaggerDoc

func (ResourceClaimTemplate) SwaggerDoc() map[string]string

func (*ResourceClaimTemplate) Unmarshal

func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error

type ResourceClaimTemplateList

type ResourceClaimTemplateList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Items is the list of resource claim templates.
	Items []ResourceClaimTemplate `json:"items" protobuf:"bytes,2,rep,name=items"`
}

ResourceClaimTemplateList is a collection of claim templates.

func (*ResourceClaimTemplateList) APILifecycleIntroduced

func (in *ResourceClaimTemplateList) APILifecycleIntroduced() (major, minor int)

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 (*ResourceClaimTemplateList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplateList.

func (*ResourceClaimTemplateList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceClaimTemplateList) DeepCopyObject

func (in *ResourceClaimTemplateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ResourceClaimTemplateList) Marshal

func (m *ResourceClaimTemplateList) Marshal() (dAtA []byte, err error)

func (*ResourceClaimTemplateList) MarshalTo

func (m *ResourceClaimTemplateList) MarshalTo(dAtA []byte) (int, error)

func (*ResourceClaimTemplateList) MarshalToSizedBuffer

func (m *ResourceClaimTemplateList) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ResourceClaimTemplateList) OpenAPIModelName

func (in ResourceClaimTemplateList) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*ResourceClaimTemplateList) Reset

func (m *ResourceClaimTemplateList) Reset()

func (*ResourceClaimTemplateList) Size

func (m *ResourceClaimTemplateList) Size() (n int)

func (*ResourceClaimTemplateList) String

func (this *ResourceClaimTemplateList) String() string

func (ResourceClaimTemplateList) SwaggerDoc

func (ResourceClaimTemplateList) SwaggerDoc() map[string]string

func (*ResourceClaimTemplateList) Unmarshal

func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error

type ResourceClaimTemplateSpec

type ResourceClaimTemplateSpec struct {
	// ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim
	// when creating it. No other fields are allowed and will be rejected during
	// validation.
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Spec for the ResourceClaim. The entire content is copied unchanged
	// into the ResourceClaim that gets created from this template. The
	// same fields as in a ResourceClaim are also valid here.
	Spec ResourceClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"`
}

ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.

func (*ResourceClaimTemplateSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplateSpec.

func (*ResourceClaimTemplateSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceClaimTemplateSpec) Marshal

func (m *ResourceClaimTemplateSpec) Marshal() (dAtA []byte, err error)

func (*ResourceClaimTemplateSpec) MarshalTo

func (m *ResourceClaimTemplateSpec) MarshalTo(dAtA []byte) (int, error)

func (*ResourceClaimTemplateSpec) MarshalToSizedBuffer

func (m *ResourceClaimTemplateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ResourceClaimTemplateSpec) OpenAPIModelName

func (in ResourceClaimTemplateSpec) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*ResourceClaimTemplateSpec) Reset

func (m *ResourceClaimTemplateSpec) Reset()

func (*ResourceClaimTemplateSpec) Size

func (m *ResourceClaimTemplateSpec) Size() (n int)

func (*ResourceClaimTemplateSpec) String

func (this *ResourceClaimTemplateSpec) String() string

func (ResourceClaimTemplateSpec) SwaggerDoc

func (ResourceClaimTemplateSpec) SwaggerDoc() map[string]string

func (*ResourceClaimTemplateSpec) Unmarshal

func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error

type ResourcePool

type ResourcePool struct {
	// Name is used to identify the pool. For node-local devices, this
	// is often the node name, but this is not required.
	//
	// It must not be longer than 253 characters and must consist of one or more DNS sub-domains
	// separated by slashes. This field is immutable.
	//
	// +required
	Name string `json:"name" protobuf:"bytes,1,name=name"`

	// Generation tracks the change in a pool over time. Whenever a driver
	// changes something about one or more of the resources in a pool, it
	// must change the generation in all ResourceSlices which are part of
	// that pool. Consumers of ResourceSlices should only consider
	// resources from the pool with the highest generation number. The
	// generation may be reset by drivers, which should be fine for
	// consumers, assuming that all ResourceSlices in a pool are updated to
	// match or deleted.
	//
	// Combined with ResourceSliceCount, this mechanism enables consumers to
	// detect pools which are comprised of multiple ResourceSlices and are
	// in an incomplete state.
	//
	// +required
	Generation int64 `json:"generation" protobuf:"bytes,2,name=generation"`

	// ResourceSliceCount is the total number of ResourceSlices in the pool at this
	// generation number. Must be greater than zero.
	//
	// Consumers can use this to check whether they have seen all ResourceSlices
	// belonging to the same pool.
	//
	// +required
	ResourceSliceCount int64 `json:"resourceSliceCount" protobuf:"bytes,3,name=resourceSliceCount"`
}

ResourcePool describes the pool that ResourceSlices belong to.

func (*ResourcePool) DeepCopy

func (in *ResourcePool) DeepCopy() *ResourcePool

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePool.

func (*ResourcePool) DeepCopyInto

func (in *ResourcePool) DeepCopyInto(out *ResourcePool)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourcePool) Marshal

func (m *ResourcePool) Marshal() (dAtA []byte, err error)

func (*ResourcePool) MarshalTo

func (m *ResourcePool) MarshalTo(dAtA []byte) (int, error)

func (*ResourcePool) MarshalToSizedBuffer

func (m *ResourcePool) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ResourcePool) OpenAPIModelName

func (in ResourcePool) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*ResourcePool) Reset

func (m *ResourcePool) Reset()

func (*ResourcePool) Size

func (m *ResourcePool) Size() (n int)

func (*ResourcePool) String

func (this *ResourcePool) String() string

func (ResourcePool) SwaggerDoc

func (ResourcePool) SwaggerDoc() map[string]string

func (*ResourcePool) Unmarshal

func (m *ResourcePool) Unmarshal(dAtA []byte) error

type ResourceSlice

type ResourceSlice struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Contains the information published by the driver.
	//
	// Changing the spec automatically increments the metadata.generation number.
	// +required
	Spec ResourceSliceSpec `json:"spec" protobuf:"bytes,2,name=spec"`
}

ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.

At the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple <driver name>, <pool name>, <device name>.

Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.

When allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.

For resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.

func (*ResourceSlice) APILifecycleIntroduced

func (in *ResourceSlice) APILifecycleIntroduced() (major, minor int)

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 (*ResourceSlice) DeepCopy

func (in *ResourceSlice) DeepCopy() *ResourceSlice

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSlice.

func (*ResourceSlice) DeepCopyInto

func (in *ResourceSlice) DeepCopyInto(out *ResourceSlice)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceSlice) DeepCopyObject

func (in *ResourceSlice) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ResourceSlice) Marshal

func (m *ResourceSlice) Marshal() (dAtA []byte, err error)

func (*ResourceSlice) MarshalTo

func (m *ResourceSlice) MarshalTo(dAtA []byte) (int, error)

func (*ResourceSlice) MarshalToSizedBuffer

func (m *ResourceSlice) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ResourceSlice) OpenAPIModelName

func (in ResourceSlice) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*ResourceSlice) Reset

func (m *ResourceSlice) Reset()

func (*ResourceSlice) Size

func (m *ResourceSlice) Size() (n int)

func (*ResourceSlice) String

func (this *ResourceSlice) String() string

func (ResourceSlice) SwaggerDoc

func (ResourceSlice) SwaggerDoc() map[string]string

func (*ResourceSlice) Unmarshal

func (m *ResourceSlice) Unmarshal(dAtA []byte) error

type ResourceSliceList

type ResourceSliceList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// +optional
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Items is the list of resource ResourceSlices.
	Items []ResourceSlice `json:"items" protobuf:"bytes,2,rep,name=items"`
}

ResourceSliceList is a collection of ResourceSlices.

func (*ResourceSliceList) APILifecycleIntroduced

func (in *ResourceSliceList) APILifecycleIntroduced() (major, minor int)

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 (*ResourceSliceList) DeepCopy

func (in *ResourceSliceList) DeepCopy() *ResourceSliceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSliceList.

func (*ResourceSliceList) DeepCopyInto

func (in *ResourceSliceList) DeepCopyInto(out *ResourceSliceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceSliceList) DeepCopyObject

func (in *ResourceSliceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ResourceSliceList) Marshal

func (m *ResourceSliceList) Marshal() (dAtA []byte, err error)

func (*ResourceSliceList) MarshalTo

func (m *ResourceSliceList) MarshalTo(dAtA []byte) (int, error)

func (*ResourceSliceList) MarshalToSizedBuffer

func (m *ResourceSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ResourceSliceList) OpenAPIModelName

func (in ResourceSliceList) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*ResourceSliceList) Reset

func (m *ResourceSliceList) Reset()

func (*ResourceSliceList) Size

func (m *ResourceSliceList) Size() (n int)

func (*ResourceSliceList) String

func (this *ResourceSliceList) String() string

func (ResourceSliceList) SwaggerDoc

func (ResourceSliceList) SwaggerDoc() map[string]string

func (*ResourceSliceList) Unmarshal

func (m *ResourceSliceList) Unmarshal(dAtA []byte) error

type ResourceSliceSpec

type ResourceSliceSpec struct {
	// Driver identifies the DRA driver providing the capacity information.
	// A field selector can be used to list only ResourceSlice
	// objects with a certain driver name.
	//
	// Must be a DNS subdomain and should end with a DNS domain owned by the
	// vendor of the driver. It should use only lower case characters.
	// This field is immutable.
	//
	// +required
	Driver string `json:"driver" protobuf:"bytes,1,name=driver"`

	// Pool describes the pool that this ResourceSlice belongs to.
	//
	// +required
	Pool ResourcePool `json:"pool" protobuf:"bytes,2,name=pool"`

	// NodeName identifies the node which provides the resources in this pool.
	// A field selector can be used to list only ResourceSlice
	// objects belonging to a certain node.
	//
	// This field can be used to limit access from nodes to ResourceSlices with
	// the same node name. It also indicates to autoscalers that adding
	// new nodes of the same type as some old node might also make new
	// resources available.
	//
	// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
	// This field is immutable.
	//
	// +optional
	// +oneOf=NodeSelection
	NodeName *string `json:"nodeName,omitempty" protobuf:"bytes,3,opt,name=nodeName"`

	// NodeSelector defines which nodes have access to the resources in the pool,
	// when that pool is not limited to a single node.
	//
	// Must use exactly one term.
	//
	// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
	//
	// +optional
	// +oneOf=NodeSelection
	NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,4,opt,name=nodeSelector"`

	// AllNodes indicates that all nodes have access to the resources in the pool.
	//
	// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
	//
	// +optional
	// +oneOf=NodeSelection
	AllNodes *bool `json:"allNodes,omitempty" protobuf:"bytes,5,opt,name=allNodes"`

	// Devices lists some or all of the devices in this pool.
	//
	// Must not have more than 128 entries. If any device uses taints or consumes counters the limit is 64.
	//
	// Only one of Devices and SharedCounters can be set in a ResourceSlice.
	//
	// +optional
	// +listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +zeroOrOneOf=ResourceSliceType
	Devices []Device `json:"devices,omitempty" protobuf:"bytes,6,name=devices"`

	// PerDeviceNodeSelection defines whether the access from nodes to
	// resources in the pool is set on the ResourceSlice level or on each
	// device. If it is set to true, every device defined the ResourceSlice
	// must specify this individually.
	//
	// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
	//
	// +optional
	// +oneOf=NodeSelection
	// +featureGate=DRAPartitionableDevices
	PerDeviceNodeSelection *bool `json:"perDeviceNodeSelection,omitempty" protobuf:"bytes,7,name=perDeviceNodeSelection"`

	// SharedCounters defines a list of counter sets, each of which
	// has a name and a list of counters available.
	//
	// The names of the counter sets must be unique in the ResourcePool.
	//
	// Only one of Devices and SharedCounters can be set in a ResourceSlice.
	//
	// The maximum number of counter sets is 8.
	//
	// +optional
	// +k8s:alpha(since: "1.36")=+k8s:optional
	// +listType=atomic
	// +k8s:listType=atomic
	// +k8s:alpha(since: "1.36")=+k8s:unique=map
	// +k8s:alpha(since: "1.36")=+k8s:listMapKey=name
	// +featureGate=DRAPartitionableDevices
	// +zeroOrOneOf=ResourceSliceType
	// +k8s:alpha(since: "1.36")=+k8s:maxItems=8
	SharedCounters []CounterSet `json:"sharedCounters,omitempty" protobuf:"bytes,8,name=sharedCounters"`
}

ResourceSliceSpec contains the information published by the driver in one ResourceSlice.

func (*ResourceSliceSpec) DeepCopy

func (in *ResourceSliceSpec) DeepCopy() *ResourceSliceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSliceSpec.

func (*ResourceSliceSpec) DeepCopyInto

func (in *ResourceSliceSpec) DeepCopyInto(out *ResourceSliceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceSliceSpec) Marshal

func (m *ResourceSliceSpec) Marshal() (dAtA []byte, err error)

func (*ResourceSliceSpec) MarshalTo

func (m *ResourceSliceSpec) MarshalTo(dAtA []byte) (int, error)

func (*ResourceSliceSpec) MarshalToSizedBuffer

func (m *ResourceSliceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ResourceSliceSpec) OpenAPIModelName

func (in ResourceSliceSpec) OpenAPIModelName() string

OpenAPIModelName returns the OpenAPI model name for this type.

func (*ResourceSliceSpec) Reset

func (m *ResourceSliceSpec) Reset()

func (*ResourceSliceSpec) Size

func (m *ResourceSliceSpec) Size() (n int)

func (*ResourceSliceSpec) String

func (this *ResourceSliceSpec) String() string

func (ResourceSliceSpec) SwaggerDoc

func (ResourceSliceSpec) SwaggerDoc() map[string]string

func (*ResourceSliceSpec) Unmarshal

func (m *ResourceSliceSpec) Unmarshal(dAtA []byte) error

Source Files

devicetaint.go doc.go generated.pb.go register.go types.go types_swagger_doc_generated.go zz_generated.deepcopy.go zz_generated.model_name.go zz_generated.prerelease-lifecycle.go

Version
v0.36.0-beta.0
Published
Mar 20, 2026
Platform
darwin/amd64
Imports
13 packages
Last checked
6 minutes ago

Tools for package owners.