resource

package
v1.30.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Overview

Package resource contains the latest (or "internal") version of the Kubernetes resource API objects.

Index

Constants

View Source
const AllocationResultResourceHandlesMaxSize = 32

AllocationResultResourceHandlesMaxSize represents the maximum number of entries in allocation.resourceHandles.

View Source
const GroupName = "resource.k8s.io"

GroupName is the group name use in this package

View Source
const PodSchedulingNodeListMaxSize = 128

PodSchedulingNodeListMaxSize defines the maximum number of entries in the node lists that are stored in PodSchedulingContext objects. This limit is part of the API.

View Source
const ResourceClaimReservedForMaxSize = 32

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

View Source
const ResourceHandleDataMaxSize = 16 * 1024

ResourceHandleDataMaxSize represents the maximum size of resourceHandle.data.

Variables

View Source
var (
	// SchemeBuilder object to register various known types
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme represents a func that can be used to apply all the registered
	// funcs in a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AllocationMode

type AllocationMode string

AllocationMode describes whether a ResourceClaim gets allocated immediately when it gets created (AllocationModeImmediate) or whether allocation is delayed until it is needed for a Pod (AllocationModeWaitForFirstConsumer). Other modes might get added in the future.

const (
	// When a ResourceClaim has AllocationModeWaitForFirstConsumer, allocation is
	// delayed until a Pod gets scheduled that needs the ResourceClaim. The
	// scheduler will consider all resource requirements of that Pod and
	// trigger allocation for a node that fits the Pod.
	AllocationModeWaitForFirstConsumer AllocationMode = "WaitForFirstConsumer"

	// When a ResourceClaim has AllocationModeImmediate, allocation starts
	// as soon as the ResourceClaim gets created. This is done without
	// considering the needs of Pods that will use the ResourceClaim
	// because those Pods are not known yet.
	AllocationModeImmediate AllocationMode = "Immediate"
)

type AllocationResult

type AllocationResult struct {
	// ResourceHandles contain the state associated with an allocation that
	// should be maintained throughout the lifetime of a claim. Each
	// ResourceHandle contains data that should be passed to a specific kubelet
	// plugin once it lands on a node. This data is returned by the driver
	// after a successful allocation and is opaque to Kubernetes. Driver
	// documentation may explain to users how to interpret this data if needed.
	//
	// Setting this field is optional. It has a maximum size of 32 entries.
	// If null (or empty), it is assumed this allocation will be processed by a
	// single kubelet plugin with no ResourceHandle data attached. The name of
	// the kubelet plugin invoked will match the DriverName set in the
	// ResourceClaimStatus this AllocationResult is embedded in.
	//
	// +listType=atomic
	// +optional
	ResourceHandles []ResourceHandle

	// This field will get set by the resource driver after it has allocated
	// the resource to inform the scheduler where it can schedule Pods using
	// the ResourceClaim.
	//
	// Setting this field is optional. If null, the resource is available
	// everywhere.
	// +optional
	AvailableOnNodes *core.NodeSelector

	// Shareable determines whether the resource supports more
	// than one consumer at a time.
	// +optional
	Shareable bool
}

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.

type AllocationResultModel added in v1.30.0

type AllocationResultModel struct {
	// NamedResources describes the allocation result when using the named resources model.
	NamedResources *NamedResourcesAllocationResult
}

AllocationResultModel must have one and only one field set.

func (*AllocationResultModel) DeepCopy added in v1.30.0

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

func (*AllocationResultModel) DeepCopyInto added in v1.30.0

func (in *AllocationResultModel) DeepCopyInto(out *AllocationResultModel)

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

type DriverAllocationResult added in v1.30.0

type DriverAllocationResult struct {
	// VendorRequestParameters are the per-request configuration parameters
	// from the time that the claim was allocated.
	VendorRequestParameters runtime.Object

	AllocationResultModel
}

DriverAllocationResult contains vendor parameters and the allocation result for one request.

func (*DriverAllocationResult) DeepCopy added in v1.30.0

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

func (*DriverAllocationResult) DeepCopyInto added in v1.30.0

func (in *DriverAllocationResult) DeepCopyInto(out *DriverAllocationResult)

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

type DriverRequests added in v1.30.0

type DriverRequests struct {
	// DriverName is the name used by the DRA driver kubelet plugin.
	DriverName string

	// VendorParameters are arbitrary setup parameters for all requests of the
	// claim. They are ignored while allocating the claim.
	VendorParameters runtime.Object

	// Requests describes all resources that are needed from the driver.
	Requests []ResourceRequest
}

DriverRequests describes all resources that are needed from one particular driver.

func (*DriverRequests) DeepCopy added in v1.30.0

func (in *DriverRequests) DeepCopy() *DriverRequests

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

func (*DriverRequests) DeepCopyInto added in v1.30.0

func (in *DriverRequests) DeepCopyInto(out *DriverRequests)

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

type NamedResourcesAllocationResult added in v1.30.0

type NamedResourcesAllocationResult struct {
	// Name is the name of the selected resource instance.
	Name string
}

NamedResourcesAllocationResult is used in AllocationResultModel.

func (*NamedResourcesAllocationResult) DeepCopy added in v1.30.0

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

func (*NamedResourcesAllocationResult) DeepCopyInto added in v1.30.0

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

type NamedResourcesAttribute added in v1.30.0

type NamedResourcesAttribute struct {
	// Name is unique identifier among all resource instances managed by
	// the driver on the node. It must be a DNS subdomain.
	Name string

	NamedResourcesAttributeValue
}

NamedResourcesAttribute is a combination of an attribute name and its value.

func (*NamedResourcesAttribute) DeepCopy added in v1.30.0

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

func (*NamedResourcesAttribute) DeepCopyInto added in v1.30.0

func (in *NamedResourcesAttribute) DeepCopyInto(out *NamedResourcesAttribute)

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

type NamedResourcesAttributeValue added in v1.30.0

type NamedResourcesAttributeValue struct {
	// QuantityValue is a quantity.
	QuantityValue *resource.Quantity
	// BoolValue is a true/false value.
	BoolValue *bool
	// IntValue is a 64-bit integer.
	IntValue *int64
	// IntSliceValue is an array of 64-bit integers.
	IntSliceValue *NamedResourcesIntSlice
	// StringValue is a string.
	StringValue *string
	// StringSliceValue is an array of strings.
	StringSliceValue *NamedResourcesStringSlice
	// VersionValue is a semantic version according to semver.org spec 2.0.0.
	VersionValue *string
}

NamedResourcesAttributeValue must have one and only one field set.

func (*NamedResourcesAttributeValue) DeepCopy added in v1.30.0

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

func (*NamedResourcesAttributeValue) DeepCopyInto added in v1.30.0

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

type NamedResourcesFilter added in v1.30.0

type NamedResourcesFilter struct {
	// Selector is a selector like the one in Request. It must be true for
	// a resource instance to be suitable for a claim using the class.
	Selector string
}

NamedResourcesFilter is used in ResourceFilterModel.

func (*NamedResourcesFilter) DeepCopy added in v1.30.0

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

func (*NamedResourcesFilter) DeepCopyInto added in v1.30.0

func (in *NamedResourcesFilter) DeepCopyInto(out *NamedResourcesFilter)

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

type NamedResourcesInstance added in v1.30.0

type NamedResourcesInstance struct {
	// Name is unique identifier among all resource instances managed by
	// the driver on the node. It must be a DNS subdomain.
	Name string

	// Attributes defines the attributes of this resource instance.
	// The name of each attribute must be unique.
	Attributes []NamedResourcesAttribute
}

NamedResourcesInstance represents one individual hardware instance that can be selected based on its attributes.

func (*NamedResourcesInstance) DeepCopy added in v1.30.0

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

func (*NamedResourcesInstance) DeepCopyInto added in v1.30.0

func (in *NamedResourcesInstance) DeepCopyInto(out *NamedResourcesInstance)

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

type NamedResourcesIntSlice added in v1.30.0

type NamedResourcesIntSlice struct {
	// Ints is the slice of 64-bit integers.
	Ints []int64
}

NamedResourcesIntSlice contains a slice of 64-bit integers.

func (*NamedResourcesIntSlice) DeepCopy added in v1.30.0

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

func (*NamedResourcesIntSlice) DeepCopyInto added in v1.30.0

func (in *NamedResourcesIntSlice) DeepCopyInto(out *NamedResourcesIntSlice)

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

type NamedResourcesRequest added in v1.30.0

type NamedResourcesRequest struct {
	// Selector is a CEL expression which must evaluate to true if a
	// resource instance is suitable. The language is as defined in
	// https://kubernetes.io/docs/reference/using-api/cel/
	//
	// In addition, for each type NamedResourcesin AttributeValue there is a map that
	// resolves to the corresponding value of the instance under evaluation.
	// For example:
	//
	//    attributes.quantity["a"].isGreaterThan(quantity("0")) &&
	//    attributes.stringslice["b"].isSorted()
	Selector string
}

NamedResourcesRequest is used in ResourceRequestModel.

func (*NamedResourcesRequest) DeepCopy added in v1.30.0

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

func (*NamedResourcesRequest) DeepCopyInto added in v1.30.0

func (in *NamedResourcesRequest) DeepCopyInto(out *NamedResourcesRequest)

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

type NamedResourcesResources added in v1.30.0

type NamedResourcesResources struct {
	// The list of all individual resources instances currently available.
	Instances []NamedResourcesInstance
}

NamedResourcesResources is used in ResourceModel.

func (*NamedResourcesResources) DeepCopy added in v1.30.0

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

func (*NamedResourcesResources) DeepCopyInto added in v1.30.0

func (in *NamedResourcesResources) DeepCopyInto(out *NamedResourcesResources)

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

type NamedResourcesStringSlice added in v1.30.0

type NamedResourcesStringSlice struct {
	// Strings is the slice of strings.
	Strings []string
}

NamedResourcesStringSlice contains a slice of strings.

func (*NamedResourcesStringSlice) DeepCopy added in v1.30.0

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

func (*NamedResourcesStringSlice) DeepCopyInto added in v1.30.0

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

type PodSchedulingContext added in v1.27.0

type PodSchedulingContext struct {
	metav1.TypeMeta
	// Standard object metadata
	// +optional
	metav1.ObjectMeta

	// Spec describes where resources for the Pod are needed.
	Spec PodSchedulingContextSpec

	// Status describes where resources for the Pod can be allocated.
	Status PodSchedulingContextStatus
}

PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation mode.

This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.

func (*PodSchedulingContext) DeepCopy added in v1.27.0

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

func (*PodSchedulingContext) DeepCopyInto added in v1.27.0

func (in *PodSchedulingContext) DeepCopyInto(out *PodSchedulingContext)

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

func (*PodSchedulingContext) DeepCopyObject added in v1.27.0

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

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

type PodSchedulingContextList added in v1.27.0

type PodSchedulingContextList struct {
	metav1.TypeMeta
	// Standard list metadata
	// +optional
	metav1.ListMeta

	// Items is the list of PodSchedulingContext objects.
	Items []PodSchedulingContext
}

PodSchedulingContextList is a collection of Pod scheduling objects.

func (*PodSchedulingContextList) DeepCopy added in v1.27.0

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

func (*PodSchedulingContextList) DeepCopyInto added in v1.27.0

func (in *PodSchedulingContextList) DeepCopyInto(out *PodSchedulingContextList)

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

func (*PodSchedulingContextList) DeepCopyObject added in v1.27.0

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

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

type PodSchedulingContextSpec added in v1.27.0

type PodSchedulingContextSpec struct {
	// SelectedNode is the node for which allocation of ResourceClaims that
	// are referenced by the Pod and that use "WaitForFirstConsumer"
	// allocation is to be attempted.
	SelectedNode string

	// PotentialNodes lists nodes where the Pod might be able to run.
	//
	// The size of this field is limited to 128. This is large enough for
	// many clusters. Larger clusters may need more attempts to find a node
	// that suits all pending resources. This may get increased in the
	// future, but not reduced.
	// +optional
	PotentialNodes []string
}

PodSchedulingContextSpec describes where resources for the Pod are needed.

func (*PodSchedulingContextSpec) DeepCopy added in v1.27.0

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

func (*PodSchedulingContextSpec) DeepCopyInto added in v1.27.0

func (in *PodSchedulingContextSpec) DeepCopyInto(out *PodSchedulingContextSpec)

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

type PodSchedulingContextStatus added in v1.27.0

type PodSchedulingContextStatus struct {
	// ResourceClaims describes resource availability for each
	// pod.spec.resourceClaim entry where the corresponding ResourceClaim
	// uses "WaitForFirstConsumer" allocation mode.
	// +optional
	ResourceClaims []ResourceClaimSchedulingStatus
}

PodSchedulingContextStatus describes where resources for the Pod can be allocated.

func (*PodSchedulingContextStatus) DeepCopy added in v1.27.0

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

func (*PodSchedulingContextStatus) DeepCopyInto added in v1.27.0

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

type ResourceClaim

type ResourceClaim struct {
	metav1.TypeMeta
	// Standard object metadata
	// +optional
	metav1.ObjectMeta

	// Spec describes the desired attributes of a resource that then needs
	// to be allocated. It can only be set once when creating the
	// ResourceClaim.
	Spec ResourceClaimSpec

	// Status describes whether the resource is available and with which
	// attributes.
	// +optional
	Status ResourceClaimStatus
}

ResourceClaim describes which resources are needed by a resource consumer. Its status tracks whether the resource has been allocated and what the resulting attributes are.

This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.

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.

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
	// Resource is the type of resource being referenced, for example "pods".
	Resource string
	// Name is the name of resource being referenced.
	Name string
	// UID identifies exactly one incarnation of the resource.
	UID types.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.

type ResourceClaimList

type ResourceClaimList struct {
	metav1.TypeMeta
	// Standard list metadata
	// +optional
	metav1.ListMeta

	// Items is the list of resource claims.
	Items []ResourceClaim
}

ResourceClaimList is a collection of claims.

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.

type ResourceClaimParameters added in v1.30.0

type ResourceClaimParameters struct {
	metav1.TypeMeta
	// Standard object metadata
	metav1.ObjectMeta

	// If this object was created from some other resource, then this links
	// back to that resource. This field is used to find the in-tree representation
	// of the claim parameters when the parameter reference of the claim refers
	// to some unknown type.
	GeneratedFrom *ResourceClaimParametersReference

	// Shareable indicates whether the allocated claim is meant to be shareable
	// by multiple consumers at the same time.
	Shareable bool

	// DriverRequests describes all resources that are needed for the
	// allocated claim. A single claim may use resources coming from
	// different drivers. For each driver, this array has at most one
	// entry which then may have one or more per-driver requests.
	//
	// May be empty, in which case the claim can always be allocated.
	DriverRequests []DriverRequests
}

ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes.

func (*ResourceClaimParameters) DeepCopy added in v1.30.0

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

func (*ResourceClaimParameters) DeepCopyInto added in v1.30.0

func (in *ResourceClaimParameters) DeepCopyInto(out *ResourceClaimParameters)

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

func (*ResourceClaimParameters) DeepCopyObject added in v1.30.0

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

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

type ResourceClaimParametersList added in v1.30.0

type ResourceClaimParametersList struct {
	metav1.TypeMeta
	// Standard list metadata
	metav1.ListMeta

	// Items is the list of node resource capacity objects.
	Items []ResourceClaimParameters
}

ResourceClaimParametersList is a collection of ResourceClaimParameters.

func (*ResourceClaimParametersList) DeepCopy added in v1.30.0

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

func (*ResourceClaimParametersList) DeepCopyInto added in v1.30.0

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

func (*ResourceClaimParametersList) DeepCopyObject added in v1.30.0

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

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

type ResourceClaimParametersReference

type ResourceClaimParametersReference 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
	// Kind is the type of resource being referenced. This is the same
	// value as in the parameter object's metadata, for example "ConfigMap".
	Kind string
	// Name is the name of resource being referenced.
	Name string
}

ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim.

func (*ResourceClaimParametersReference) DeepCopy

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

func (*ResourceClaimParametersReference) DeepCopyInto

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

type ResourceClaimSchedulingStatus

type ResourceClaimSchedulingStatus struct {
	// Name matches the pod.spec.resourceClaims[*].Name field.
	Name string

	// UnsuitableNodes lists nodes that the ResourceClaim cannot be
	// allocated for.
	//
	// The size of this field is limited to 128, the same as for
	// PodSchedulingSpec.PotentialNodes. This may get increased in the
	// future, but not reduced.
	// +optional
	UnsuitableNodes []string
}

ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with "WaitForFirstConsumer" allocation mode.

func (*ResourceClaimSchedulingStatus) DeepCopy

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

func (*ResourceClaimSchedulingStatus) DeepCopyInto

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

type ResourceClaimSpec

type ResourceClaimSpec struct {
	// ResourceClassName references the driver and additional parameters
	// via the name of a ResourceClass that was created as part of the
	// driver deployment.
	ResourceClassName string

	// ParametersRef references a separate object with arbitrary parameters
	// that will be used by the driver when allocating a resource for the
	// claim.
	//
	// The object must be in the same namespace as the ResourceClaim.
	// +optional
	ParametersRef *ResourceClaimParametersReference

	// Allocation can start immediately or when a Pod wants to use the
	// resource. "WaitForFirstConsumer" is the default.
	// +optional
	AllocationMode AllocationMode
}

ResourceClaimSpec defines how a resource is to be allocated.

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.

type ResourceClaimStatus

type ResourceClaimStatus struct {
	// DriverName is a copy of the driver name from the ResourceClass at
	// the time when allocation started.
	// +optional
	DriverName string

	// Allocation is set by the resource driver once a resource or set of
	// resources has been allocated successfully. If this is not specified, the
	// resources have not been allocated yet.
	// +optional
	Allocation *AllocationResult

	// 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.
	//
	// There can be at most 32 such reservations. This may get increased in
	// the future, but not reduced.
	// +optional
	ReservedFor []ResourceClaimConsumerReference

	// DeallocationRequested indicates that a ResourceClaim is to be
	// deallocated.
	//
	// The driver then must deallocate this claim and reset the field
	// together with clearing the Allocation field.
	//
	// While DeallocationRequested is set, no new consumers may be added to
	// ReservedFor.
	// +optional
	DeallocationRequested bool
}

ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are.

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.

type ResourceClaimTemplate

type ResourceClaimTemplate struct {
	metav1.TypeMeta
	// Standard object metadata
	// +optional
	metav1.ObjectMeta

	// 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
}

ResourceClaimTemplate is used to produce ResourceClaim objects.

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.

type ResourceClaimTemplateList

type ResourceClaimTemplateList struct {
	metav1.TypeMeta
	// Standard list metadata
	// +optional
	metav1.ListMeta

	// Items is the list of resource claim templates.
	Items []ResourceClaimTemplate
}

ResourceClaimTemplateList is a collection of claim templates.

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.

type ResourceClaimTemplateSpec

type ResourceClaimTemplateSpec struct {
	// ObjectMeta may contain labels and annotations that will be copied into the PVC
	// when creating it. No other fields are allowed and will be rejected during
	// validation.
	// +optional
	metav1.ObjectMeta

	// 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
}

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.

type ResourceClass

type ResourceClass struct {
	metav1.TypeMeta
	// Standard object metadata
	// +optional
	metav1.ObjectMeta

	// DriverName defines the name of the dynamic resource driver that is
	// used for allocation of a ResourceClaim that uses this class.
	//
	// Resource drivers have a unique name in forward domain order
	// (acme.example.com).
	DriverName string

	// ParametersRef references an arbitrary separate object that may hold
	// parameters that will be used by the driver when allocating a
	// resource that uses this class. A dynamic resource driver can
	// distinguish between parameters stored here and and those stored in
	// ResourceClaimSpec.
	// +optional
	ParametersRef *ResourceClassParametersReference

	// Only nodes matching the selector will be considered by the scheduler
	// when trying to find a Node that fits a Pod when that Pod uses
	// a ResourceClaim that has not been allocated yet.
	//
	// Setting this field is optional. If null, all nodes are candidates.
	// +optional
	SuitableNodes *core.NodeSelector

	// If and only if allocation of claims using this class is handled
	// via structured parameters, then StructuredParameters must be set to true.
	StructuredParameters *bool
}

ResourceClass is used by administrators to influence how resources are allocated.

This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.

func (*ResourceClass) DeepCopy

func (in *ResourceClass) DeepCopy() *ResourceClass

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

func (*ResourceClass) DeepCopyInto

func (in *ResourceClass) DeepCopyInto(out *ResourceClass)

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

func (*ResourceClass) DeepCopyObject

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

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

type ResourceClassList

type ResourceClassList struct {
	metav1.TypeMeta
	// Standard list metadata
	// +optional
	metav1.ListMeta

	// Items is the list of resource classes.
	Items []ResourceClass
}

ResourceClassList is a collection of classes.

func (*ResourceClassList) DeepCopy

func (in *ResourceClassList) DeepCopy() *ResourceClassList

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

func (*ResourceClassList) DeepCopyInto

func (in *ResourceClassList) DeepCopyInto(out *ResourceClassList)

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

func (*ResourceClassList) DeepCopyObject

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

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

type ResourceClassParameters added in v1.30.0

type ResourceClassParameters struct {
	metav1.TypeMeta
	// Standard object metadata
	metav1.ObjectMeta

	// If this object was created from some other resource, then this links
	// back to that resource. This field is used to find the in-tree representation
	// of the class parameters when the parameter reference of the class refers
	// to some unknown type.
	GeneratedFrom *ResourceClassParametersReference

	// VendorParameters are arbitrary setup parameters for all claims using
	// this class. They are ignored while allocating the claim. There must
	// not be more than one entry per driver.
	VendorParameters []VendorParameters

	// Filters describes additional contraints that must be met when using the class.
	Filters []ResourceFilter
}

ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes.

func (*ResourceClassParameters) DeepCopy added in v1.30.0

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

func (*ResourceClassParameters) DeepCopyInto added in v1.30.0

func (in *ResourceClassParameters) DeepCopyInto(out *ResourceClassParameters)

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

func (*ResourceClassParameters) DeepCopyObject added in v1.30.0

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

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

type ResourceClassParametersList added in v1.30.0

type ResourceClassParametersList struct {
	metav1.TypeMeta
	// Standard list metadata
	metav1.ListMeta

	// Items is the list of node resource capacity objects.
	Items []ResourceClassParameters
}

ResourceClassParametersList is a collection of ResourceClassParameters.

func (*ResourceClassParametersList) DeepCopy added in v1.30.0

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

func (*ResourceClassParametersList) DeepCopyInto added in v1.30.0

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

func (*ResourceClassParametersList) DeepCopyObject added in v1.30.0

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

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

type ResourceClassParametersReference

type ResourceClassParametersReference 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
	// Kind is the type of resource being referenced. This is the same
	// value as in the parameter object's metadata.
	Kind string
	// Name is the name of resource being referenced.
	Name string
	// Namespace that contains the referenced resource. Must be empty
	// for cluster-scoped resources and non-empty for namespaced
	// resources.
	// +optional
	Namespace string
}

ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.

func (*ResourceClassParametersReference) DeepCopy

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

func (*ResourceClassParametersReference) DeepCopyInto

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

type ResourceFilter added in v1.30.0

type ResourceFilter struct {
	// DriverName is the name used by the DRA driver kubelet plugin.
	DriverName string

	ResourceFilterModel
}

ResourceFilter is a filter for resources from one particular driver.

func (*ResourceFilter) DeepCopy added in v1.30.0

func (in *ResourceFilter) DeepCopy() *ResourceFilter

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

func (*ResourceFilter) DeepCopyInto added in v1.30.0

func (in *ResourceFilter) DeepCopyInto(out *ResourceFilter)

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

type ResourceFilterModel added in v1.30.0

type ResourceFilterModel struct {
	// NamedResources describes a resource filter using the named resources model.
	NamedResources *NamedResourcesFilter
}

ResourceFilterModel must have one and only one field set.

func (*ResourceFilterModel) DeepCopy added in v1.30.0

func (in *ResourceFilterModel) DeepCopy() *ResourceFilterModel

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

func (*ResourceFilterModel) DeepCopyInto added in v1.30.0

func (in *ResourceFilterModel) DeepCopyInto(out *ResourceFilterModel)

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

type ResourceHandle added in v1.27.0

type ResourceHandle struct {
	// DriverName specifies the name of the resource driver whose kubelet
	// plugin should be invoked to process this ResourceHandle's data once it
	// lands on a node. This may differ from the DriverName set in
	// ResourceClaimStatus this ResourceHandle is embedded in.
	DriverName string

	// Data contains the opaque data associated with this ResourceHandle. It is
	// set by the controller component of the resource driver whose name
	// matches the DriverName set in the ResourceClaimStatus this
	// ResourceHandle is embedded in. It is set at allocation time and is
	// intended for processing by the kubelet plugin whose name matches
	// the DriverName set in this ResourceHandle.
	//
	// The maximum size of this field is 16KiB. This may get increased in the
	// future, but not reduced.
	// +optional
	Data string

	// If StructuredData is set, then it needs to be used instead of Data.
	StructuredData *StructuredResourceHandle
}

ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.

func (*ResourceHandle) DeepCopy added in v1.27.0

func (in *ResourceHandle) DeepCopy() *ResourceHandle

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

func (*ResourceHandle) DeepCopyInto added in v1.27.0

func (in *ResourceHandle) DeepCopyInto(out *ResourceHandle)

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

type ResourceModel added in v1.30.0

type ResourceModel struct {
	// NamedResources describes available resources using the named resources model.
	NamedResources *NamedResourcesResources
}

ResourceModel must have one and only one field set.

func (*ResourceModel) DeepCopy added in v1.30.0

func (in *ResourceModel) DeepCopy() *ResourceModel

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

func (*ResourceModel) DeepCopyInto added in v1.30.0

func (in *ResourceModel) DeepCopyInto(out *ResourceModel)

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

type ResourceRequest added in v1.30.0

type ResourceRequest struct {
	// VendorParameters are arbitrary setup parameters for the requested
	// resource. They are ignored while allocating a claim.
	VendorParameters runtime.Object

	ResourceRequestModel
}

ResourceRequest is a request for resources from one particular driver.

func (*ResourceRequest) DeepCopy added in v1.30.0

func (in *ResourceRequest) DeepCopy() *ResourceRequest

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

func (*ResourceRequest) DeepCopyInto added in v1.30.0

func (in *ResourceRequest) DeepCopyInto(out *ResourceRequest)

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

type ResourceRequestModel added in v1.30.0

type ResourceRequestModel struct {
	// NamedResources describes a request for resources with the named resources model.
	NamedResources *NamedResourcesRequest
}

ResourceRequestModel must have one and only one field set.

func (*ResourceRequestModel) DeepCopy added in v1.30.0

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

func (*ResourceRequestModel) DeepCopyInto added in v1.30.0

func (in *ResourceRequestModel) DeepCopyInto(out *ResourceRequestModel)

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

type ResourceSlice added in v1.30.0

type ResourceSlice struct {
	metav1.TypeMeta
	// Standard object metadata
	metav1.ObjectMeta

	// NodeName identifies the node which provides the resources
	// if they are local to a node.
	//
	// A field selector can be used to list only ResourceSlice
	// objects with a certain node name.
	NodeName string

	// DriverName identifies the DRA driver providing the capacity information.
	// A field selector can be used to list only ResourceSlice
	// objects with a certain driver name.
	DriverName string

	ResourceModel
}

ResourceSlice provides information about available resources on individual nodes.

func (*ResourceSlice) DeepCopy added in v1.30.0

func (in *ResourceSlice) DeepCopy() *ResourceSlice

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

func (*ResourceSlice) DeepCopyInto added in v1.30.0

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 added in v1.30.0

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

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

type ResourceSliceList added in v1.30.0

type ResourceSliceList struct {
	metav1.TypeMeta
	// Standard list metadata
	metav1.ListMeta

	// Items is the list of node resource capacity objects.
	Items []ResourceSlice
}

ResourceSliceList is a collection of ResourceSlices.

func (*ResourceSliceList) DeepCopy added in v1.30.0

func (in *ResourceSliceList) DeepCopy() *ResourceSliceList

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

func (*ResourceSliceList) DeepCopyInto added in v1.30.0

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 added in v1.30.0

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

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

type StructuredResourceHandle added in v1.30.0

type StructuredResourceHandle struct {
	// VendorClassParameters are the per-claim configuration parameters
	// from the resource class at the time that the claim was allocated.
	VendorClassParameters runtime.Object

	// VendorClaimParameters are the per-claim configuration parameters
	// from the resource claim parameters at the time that the claim was
	// allocated.
	VendorClaimParameters runtime.Object

	// NodeName is the name of the node providing the necessary resources
	// if the resources are local to a node.
	NodeName string

	// Results lists all allocated driver resources.
	Results []DriverAllocationResult
}

StructuredResourceHandle is the in-tree representation of the allocation result.

func (*StructuredResourceHandle) DeepCopy added in v1.30.0

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

func (*StructuredResourceHandle) DeepCopyInto added in v1.30.0

func (in *StructuredResourceHandle) DeepCopyInto(out *StructuredResourceHandle)

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

type VendorParameters added in v1.30.0

type VendorParameters struct {
	// DriverName is the name used by the DRA driver kubelet plugin.
	DriverName string

	// Parameters can be arbitrary setup parameters. They are ignored while
	// allocating a claim.
	Parameters runtime.Object
}

VendorParameters are opaque parameters for one particular driver.

func (*VendorParameters) DeepCopy added in v1.30.0

func (in *VendorParameters) DeepCopy() *VendorParameters

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

func (*VendorParameters) DeepCopyInto added in v1.30.0

func (in *VendorParameters) DeepCopyInto(out *VendorParameters)

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

Directories

Path Synopsis
Package install installs the resource API, making it available as an option to all of the API encoding/decoding machinery.
Package install installs the resource API, making it available as an option to all of the API encoding/decoding machinery.
structured
Package v1alpha2 is the v1alpha2 version of the resource API.
Package v1alpha2 is the v1alpha2 version of the resource API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL