Documentation ¶
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type AllocationResult
- type DriverAllocationResult
- type DriverRequests
- type NamedResourcesAllocationResult
- type NamedResourcesAttribute
- type NamedResourcesFilter
- type NamedResourcesInstance
- type NamedResourcesIntSlice
- type NamedResourcesRequest
- type NamedResourcesResources
- type NamedResourcesStringSlice
- type PodSchedulingContext
- type PodSchedulingContextList
- type PodSchedulingContextSpec
- type PodSchedulingContextStatus
- type ResourceClaim
- type ResourceClaimConsumerReference
- type ResourceClaimList
- type ResourceClaimParameters
- type ResourceClaimParametersList
- type ResourceClaimParametersReference
- type ResourceClaimSchedulingStatus
- type ResourceClaimSpec
- type ResourceClaimStatus
- type ResourceClaimTemplate
- type ResourceClaimTemplateList
- type ResourceClaimTemplateSpec
- type ResourceClass
- type ResourceClassList
- type ResourceClassParameters
- type ResourceClassParametersList
- type ResourceClassParametersReference
- type ResourceFilter
- type ResourceHandle
- type ResourceRequest
- type ResourceSlice
- type ResourceSliceList
- type StructuredResourceHandle
- type VendorParameters
Constants ¶
const GroupName = "resource.k8s.io"
GroupName is the group name use in this package
Variables ¶
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}
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 AllocationResult ¶
type AllocationResult struct { // 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. AvailableOnNodes *api_core_v1.NodeSelector `json:"availableOnNodes,omitempty"` // 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. ResourceHandles []*ResourceHandle `json:"resourceHandles,omitempty"` Shareable bool `json:"shareable,omitempty"` }
AllocationResult AllocationResult contains attributes of an allocated resource.
swagger:model AllocationResult
type DriverAllocationResult ¶
type DriverAllocationResult struct { // NamedResources describes the allocation result when using the named resources model. NamedResources *NamedResourcesAllocationResult `json:"namedResources,omitempty"` // VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated. VendorRequestParameters jsonext.RawMessage `json:"vendorRequestParameters,omitempty"` }
DriverAllocationResult DriverAllocationResult contains vendor parameters and the allocation result for one request.
swagger:model DriverAllocationResult
type DriverRequests ¶
type DriverRequests struct { // DriverName is the name used by the DRA driver kubelet plugin. DriverName string `json:"driverName,omitempty"` // Requests describes all resources that are needed from the driver. Requests []*ResourceRequest `json:"requests,omitempty"` // VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim. VendorParameters jsonext.RawMessage `json:"vendorParameters,omitempty"` }
DriverRequests DriverRequests describes all resources that are needed from one particular driver.
swagger:model DriverRequests
type NamedResourcesAllocationResult ¶
type NamedResourcesAllocationResult struct { // Name is the name of the selected resource instance. // Required: true Name *string `json:"name"` }
NamedResourcesAllocationResult NamedResourcesAllocationResult is used in AllocationResultModel.
swagger:model NamedResourcesAllocationResult
type NamedResourcesAttribute ¶
type NamedResourcesAttribute struct { // BoolValue is a true/false value. Bool bool `json:"bool,omitempty"` // IntValue is a 64-bit integer. Int int64 `json:"int,omitempty"` // IntSliceValue is an array of 64-bit integers. IntSlice *NamedResourcesIntSlice `json:"intSlice,omitempty"` // Name is unique identifier among all resource instances managed by the driver on the node. It must be a DNS subdomain. // Required: true Name *string `json:"name"` // QuantityValue is a quantity. Quantity *apimachinery_pkg_api_resource.Quantity `json:"quantity,omitempty"` // StringValue is a string. String string `json:"string,omitempty"` // StringSliceValue is an array of strings. StringSlice *NamedResourcesStringSlice `json:"stringSlice,omitempty"` // VersionValue is a semantic version according to semver.org spec 2.0.0. Version string `json:"version,omitempty"` }
NamedResourcesAttribute NamedResourcesAttribute is a combination of an attribute name and its value.
swagger:model NamedResourcesAttribute
type NamedResourcesFilter ¶
type NamedResourcesFilter 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() // Required: true Selector *string `json:"selector"` }
NamedResourcesFilter NamedResourcesFilter is used in ResourceFilterModel.
swagger:model NamedResourcesFilter
type NamedResourcesInstance ¶
type NamedResourcesInstance struct { // Attributes defines the attributes of this resource instance. The name of each attribute must be unique. Attributes []*NamedResourcesAttribute `json:"attributes,omitempty"` // Name is unique identifier among all resource instances managed by the driver on the node. It must be a DNS subdomain. // Required: true Name *string `json:"name"` }
NamedResourcesInstance NamedResourcesInstance represents one individual hardware instance that can be selected based on its attributes.
swagger:model NamedResourcesInstance
type NamedResourcesIntSlice ¶
type NamedResourcesIntSlice struct { // Ints is the slice of 64-bit integers. // Required: true Ints []int64 `json:"ints"` }
NamedResourcesIntSlice NamedResourcesIntSlice contains a slice of 64-bit integers.
swagger:model NamedResourcesIntSlice
type NamedResourcesRequest ¶
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() // Required: true Selector *string `json:"selector"` }
NamedResourcesRequest NamedResourcesRequest is used in ResourceRequestModel.
swagger:model NamedResourcesRequest
type NamedResourcesResources ¶
type NamedResourcesResources struct { // The list of all individual resources instances currently available. // Required: true Instances []*NamedResourcesInstance `json:"instances"` }
NamedResourcesResources NamedResourcesResources is used in ResourceModel.
swagger:model NamedResourcesResources
type NamedResourcesStringSlice ¶
type NamedResourcesStringSlice struct { // Strings is the slice of strings. // Required: true Strings []string `json:"strings"` }
NamedResourcesStringSlice NamedResourcesStringSlice contains a slice of strings.
swagger:model NamedResourcesStringSlice
type PodSchedulingContext ¶
type PodSchedulingContext struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources APIVersion string `json:"apiVersion,omitempty"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind,omitempty"` // Standard object metadata Metadata *apimachinery_pkg_apis_meta_v1.ObjectMeta `json:"metadata,omitempty"` // Spec describes where resources for the Pod are needed. // Required: true Spec *PodSchedulingContextSpec `json:"spec"` // Status describes where resources for the Pod can be allocated. Status *PodSchedulingContextStatus `json:"status,omitempty"` }
PodSchedulingContext 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.
swagger:model PodSchedulingContext
func (*PodSchedulingContext) GroupVersionKind ¶
func (v *PodSchedulingContext) GroupVersionKind() schema.GroupVersionKind
type PodSchedulingContextList ¶
type PodSchedulingContextList struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources APIVersion string `json:"apiVersion,omitempty"` // Items is the list of PodSchedulingContext objects. // Required: true Items []*PodSchedulingContext `json:"items"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind,omitempty"` // Standard list metadata Metadata *apimachinery_pkg_apis_meta_v1.ListMeta `json:"metadata,omitempty"` }
PodSchedulingContextList PodSchedulingContextList is a collection of Pod scheduling objects.
swagger:model PodSchedulingContextList
func (*PodSchedulingContextList) GroupVersionKind ¶
func (v *PodSchedulingContextList) GroupVersionKind() schema.GroupVersionKind
type PodSchedulingContextSpec ¶
type PodSchedulingContextSpec struct { // 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. PotentialNodes []string `json:"potentialNodes,omitempty"` // 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 `json:"selectedNode,omitempty"` }
PodSchedulingContextSpec PodSchedulingContextSpec describes where resources for the Pod are needed.
swagger:model PodSchedulingContextSpec
type PodSchedulingContextStatus ¶
type PodSchedulingContextStatus struct { // ResourceClaims describes resource availability for each pod.spec.resourceClaim entry where the corresponding ResourceClaim uses "WaitForFirstConsumer" allocation mode. ResourceClaims []*ResourceClaimSchedulingStatus `json:"resourceClaims,omitempty"` }
PodSchedulingContextStatus PodSchedulingContextStatus describes where resources for the Pod can be allocated.
swagger:model PodSchedulingContextStatus
type ResourceClaim ¶
type ResourceClaim struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources APIVersion string `json:"apiVersion,omitempty"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind,omitempty"` // Standard object metadata Metadata *apimachinery_pkg_apis_meta_v1.ObjectMeta `json:"metadata,omitempty"` // Spec describes the desired attributes of a resource that then needs to be allocated. It can only be set once when creating the ResourceClaim. // Required: true Spec *ResourceClaimSpec `json:"spec"` // Status describes whether the resource is available and with which attributes. Status *ResourceClaimStatus `json:"status,omitempty"` }
ResourceClaim 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.
swagger:model ResourceClaim
func (*ResourceClaim) GroupVersionKind ¶
func (v *ResourceClaim) GroupVersionKind() schema.GroupVersionKind
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. APIGroup string `json:"apiGroup,omitempty"` // Name is the name of resource being referenced. // Required: true Name *string `json:"name"` // Resource is the type of resource being referenced, for example "pods". // Required: true Resource *string `json:"resource"` // UID identifies exactly one incarnation of the resource. // Required: true UID *string `json:"uid"` }
ResourceClaimConsumerReference 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.
swagger:model ResourceClaimConsumerReference
type ResourceClaimList ¶
type ResourceClaimList struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources APIVersion string `json:"apiVersion,omitempty"` // Items is the list of resource claims. // Required: true Items []*ResourceClaim `json:"items"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind,omitempty"` // Standard list metadata Metadata *apimachinery_pkg_apis_meta_v1.ListMeta `json:"metadata,omitempty"` }
ResourceClaimList ResourceClaimList is a collection of claims.
swagger:model ResourceClaimList
func (*ResourceClaimList) GroupVersionKind ¶
func (v *ResourceClaimList) GroupVersionKind() schema.GroupVersionKind
type ResourceClaimParameters ¶
type ResourceClaimParameters struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources APIVersion string `json:"apiVersion,omitempty"` // 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 `json:"driverRequests,omitempty"` // 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 `json:"generatedFrom,omitempty"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind,omitempty"` // Standard object metadata Metadata *apimachinery_pkg_apis_meta_v1.ObjectMeta `json:"metadata,omitempty"` Shareable bool `json:"shareable,omitempty"` }
ResourceClaimParameters ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes.
swagger:model ResourceClaimParameters
func (*ResourceClaimParameters) GroupVersionKind ¶
func (v *ResourceClaimParameters) GroupVersionKind() schema.GroupVersionKind
type ResourceClaimParametersList ¶
type ResourceClaimParametersList struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources APIVersion string `json:"apiVersion,omitempty"` // Items is the list of node resource capacity objects. // Required: true Items []*ResourceClaimParameters `json:"items"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind,omitempty"` // Standard list metadata Metadata *apimachinery_pkg_apis_meta_v1.ListMeta `json:"metadata,omitempty"` }
ResourceClaimParametersList ResourceClaimParametersList is a collection of ResourceClaimParameters.
swagger:model ResourceClaimParametersList
func (*ResourceClaimParametersList) GroupVersionKind ¶
func (v *ResourceClaimParametersList) GroupVersionKind() schema.GroupVersionKind
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. APIGroup string `json:"apiGroup,omitempty"` // Kind is the type of resource being referenced. This is the same value as in the parameter object's metadata, for example "ConfigMap". // Required: true Kind *string `json:"kind"` // Name is the name of resource being referenced. // Required: true Name *string `json:"name"` }
ResourceClaimParametersReference ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim.
swagger:model ResourceClaimParametersReference
type ResourceClaimSchedulingStatus ¶
type ResourceClaimSchedulingStatus struct { // Name matches the pod.spec.resourceClaims[*].Name field. Name string `json:"name,omitempty"` // 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. UnsuitableNodes []string `json:"unsuitableNodes,omitempty"` }
ResourceClaimSchedulingStatus ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with "WaitForFirstConsumer" allocation mode.
swagger:model ResourceClaimSchedulingStatus
type ResourceClaimSpec ¶
type ResourceClaimSpec struct { // Allocation can start immediately or when a Pod wants to use the resource. "WaitForFirstConsumer" is the default. AllocationMode string `json:"allocationMode,omitempty"` // 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. ParametersRef *ResourceClaimParametersReference `json:"parametersRef,omitempty"` // ResourceClassName references the driver and additional parameters via the name of a ResourceClass that was created as part of the driver deployment. // Required: true ResourceClassName *string `json:"resourceClassName"` }
ResourceClaimSpec ResourceClaimSpec defines how a resource is to be allocated.
swagger:model ResourceClaimSpec
type ResourceClaimStatus ¶
type ResourceClaimStatus struct { // 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. Allocation *AllocationResult `json:"allocation,omitempty"` // 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. DeallocationRequested bool `json:"deallocationRequested,omitempty"` // DriverName is a copy of the driver name from the ResourceClass at the time when allocation started. DriverName string `json:"driverName,omitempty"` // 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. ReservedFor []*ResourceClaimConsumerReference `json:"reservedFor,omitempty"` }
ResourceClaimStatus ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are.
swagger:model ResourceClaimStatus
type ResourceClaimTemplate ¶
type ResourceClaimTemplate struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources APIVersion string `json:"apiVersion,omitempty"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind,omitempty"` // Standard object metadata Metadata *apimachinery_pkg_apis_meta_v1.ObjectMeta `json:"metadata,omitempty"` // 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. // Required: true Spec *ResourceClaimTemplateSpec `json:"spec"` }
ResourceClaimTemplate ResourceClaimTemplate is used to produce ResourceClaim objects.
swagger:model ResourceClaimTemplate
func (*ResourceClaimTemplate) GroupVersionKind ¶
func (v *ResourceClaimTemplate) GroupVersionKind() schema.GroupVersionKind
type ResourceClaimTemplateList ¶
type ResourceClaimTemplateList struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources APIVersion string `json:"apiVersion,omitempty"` // Items is the list of resource claim templates. // Required: true Items []*ResourceClaimTemplate `json:"items"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind,omitempty"` // Standard list metadata Metadata *apimachinery_pkg_apis_meta_v1.ListMeta `json:"metadata,omitempty"` }
ResourceClaimTemplateList ResourceClaimTemplateList is a collection of claim templates.
swagger:model ResourceClaimTemplateList
func (*ResourceClaimTemplateList) GroupVersionKind ¶
func (v *ResourceClaimTemplateList) GroupVersionKind() schema.GroupVersionKind
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. Metadata *apimachinery_pkg_apis_meta_v1.ObjectMeta `json:"metadata,omitempty"` // 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. // Required: true Spec *ResourceClaimSpec `json:"spec"` }
ResourceClaimTemplateSpec ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.
swagger:model ResourceClaimTemplateSpec
type ResourceClass ¶
type ResourceClass struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources APIVersion string `json:"apiVersion,omitempty"` // 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). // Required: true DriverName *string `json:"driverName"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind,omitempty"` // Standard object metadata Metadata *apimachinery_pkg_apis_meta_v1.ObjectMeta `json:"metadata,omitempty"` // 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. ParametersRef *ResourceClassParametersReference `json:"parametersRef,omitempty"` // If and only if allocation of claims using this class is handled via structured parameters, then StructuredParameters must be set to true. StructuredParameters bool `json:"structuredParameters,omitempty"` // 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. SuitableNodes *api_core_v1.NodeSelector `json:"suitableNodes,omitempty"` }
ResourceClass ResourceClass is used by administrators to influence how resources are allocated.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
swagger:model ResourceClass
func (*ResourceClass) GroupVersionKind ¶
func (v *ResourceClass) GroupVersionKind() schema.GroupVersionKind
type ResourceClassList ¶
type ResourceClassList struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources APIVersion string `json:"apiVersion,omitempty"` // Items is the list of resource classes. // Required: true Items []*ResourceClass `json:"items"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind,omitempty"` // Standard list metadata Metadata *apimachinery_pkg_apis_meta_v1.ListMeta `json:"metadata,omitempty"` }
ResourceClassList ResourceClassList is a collection of classes.
swagger:model ResourceClassList
func (*ResourceClassList) GroupVersionKind ¶
func (v *ResourceClassList) GroupVersionKind() schema.GroupVersionKind
type ResourceClassParameters ¶
type ResourceClassParameters struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources APIVersion string `json:"apiVersion,omitempty"` // Filters describes additional contraints that must be met when using the class. Filters []*ResourceFilter `json:"filters,omitempty"` // 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 `json:"generatedFrom,omitempty"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind,omitempty"` // Standard object metadata Metadata *apimachinery_pkg_apis_meta_v1.ObjectMeta `json:"metadata,omitempty"` // 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 `json:"vendorParameters,omitempty"` }
ResourceClassParameters ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes.
swagger:model ResourceClassParameters
func (*ResourceClassParameters) GroupVersionKind ¶
func (v *ResourceClassParameters) GroupVersionKind() schema.GroupVersionKind
type ResourceClassParametersList ¶
type ResourceClassParametersList struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources APIVersion string `json:"apiVersion,omitempty"` // Items is the list of node resource capacity objects. // Required: true Items []*ResourceClassParameters `json:"items"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind,omitempty"` // Standard list metadata Metadata *apimachinery_pkg_apis_meta_v1.ListMeta `json:"metadata,omitempty"` }
ResourceClassParametersList ResourceClassParametersList is a collection of ResourceClassParameters.
swagger:model ResourceClassParametersList
func (*ResourceClassParametersList) GroupVersionKind ¶
func (v *ResourceClassParametersList) GroupVersionKind() schema.GroupVersionKind
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. APIGroup string `json:"apiGroup,omitempty"` // Kind is the type of resource being referenced. This is the same value as in the parameter object's metadata. // Required: true Kind *string `json:"kind"` // Name is the name of resource being referenced. // Required: true Name *string `json:"name"` // Namespace that contains the referenced resource. Must be empty for cluster-scoped resources and non-empty for namespaced resources. Namespace string `json:"namespace,omitempty"` }
ResourceClassParametersReference ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.
swagger:model ResourceClassParametersReference
type ResourceFilter ¶
type ResourceFilter struct { // DriverName is the name used by the DRA driver kubelet plugin. DriverName string `json:"driverName,omitempty"` // NamedResources describes a resource filter using the named resources model. NamedResources *NamedResourcesFilter `json:"namedResources,omitempty"` }
ResourceFilter ResourceFilter is a filter for resources from one particular driver.
swagger:model ResourceFilter
type ResourceHandle ¶
type ResourceHandle struct { // 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. Data string `json:"data,omitempty"` // 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 `json:"driverName,omitempty"` // If StructuredData is set, then it needs to be used instead of Data. StructuredData *StructuredResourceHandle `json:"structuredData,omitempty"` }
ResourceHandle ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.
swagger:model ResourceHandle
type ResourceRequest ¶
type ResourceRequest struct { // NamedResources describes a request for resources with the named resources model. NamedResources *NamedResourcesRequest `json:"namedResources,omitempty"` // VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim. VendorParameters jsonext.RawMessage `json:"vendorParameters,omitempty"` }
ResourceRequest ResourceRequest is a request for resources from one particular driver.
swagger:model ResourceRequest
type ResourceSlice ¶
type ResourceSlice struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources APIVersion string `json:"apiVersion,omitempty"` // 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. // Required: true DriverName *string `json:"driverName"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind,omitempty"` // Standard object metadata Metadata *apimachinery_pkg_apis_meta_v1.ObjectMeta `json:"metadata,omitempty"` // NamedResources describes available resources using the named resources model. NamedResources *NamedResourcesResources `json:"namedResources,omitempty"` // 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 `json:"nodeName,omitempty"` }
ResourceSlice ResourceSlice provides information about available resources on individual nodes.
swagger:model ResourceSlice
func (*ResourceSlice) GroupVersionKind ¶
func (v *ResourceSlice) GroupVersionKind() schema.GroupVersionKind
type ResourceSliceList ¶
type ResourceSliceList struct { // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources APIVersion string `json:"apiVersion,omitempty"` // Items is the list of node resource capacity objects. // Required: true Items []*ResourceSlice `json:"items"` // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind,omitempty"` // Standard list metadata Metadata *apimachinery_pkg_apis_meta_v1.ListMeta `json:"metadata,omitempty"` }
ResourceSliceList ResourceSliceList is a collection of ResourceSlices.
swagger:model ResourceSliceList
func (*ResourceSliceList) GroupVersionKind ¶
func (v *ResourceSliceList) GroupVersionKind() schema.GroupVersionKind
type StructuredResourceHandle ¶
type StructuredResourceHandle struct { // NodeName is the name of the node providing the necessary resources if the resources are local to a node. NodeName string `json:"nodeName,omitempty"` // Results lists all allocated driver resources. // Required: true Results []*DriverAllocationResult `json:"results"` // VendorClaimParameters are the per-claim configuration parameters from the resource claim parameters at the time that the claim was allocated. VendorClaimParameters jsonext.RawMessage `json:"vendorClaimParameters,omitempty"` // VendorClassParameters are the per-claim configuration parameters from the resource class at the time that the claim was allocated. VendorClassParameters jsonext.RawMessage `json:"vendorClassParameters,omitempty"` }
StructuredResourceHandle StructuredResourceHandle is the in-tree representation of the allocation result.
swagger:model StructuredResourceHandle
type VendorParameters ¶
type VendorParameters struct { // DriverName is the name used by the DRA driver kubelet plugin. DriverName string `json:"driverName,omitempty"` // Parameters can be arbitrary setup parameters. They are ignored while allocating a claim. Parameters jsonext.RawMessage `json:"parameters,omitempty"` }
VendorParameters VendorParameters are opaque parameters for one particular driver.
swagger:model VendorParameters
Source Files ¶
- allocation_result.go
- driver_allocation_result.go
- driver_requests.go
- group_info.go
- named_resources_allocation_result.go
- named_resources_attribute.go
- named_resources_filter.go
- named_resources_instance.go
- named_resources_int_slice.go
- named_resources_request.go
- named_resources_resources.go
- named_resources_string_slice.go
- pod_scheduling_context.go
- pod_scheduling_context_gvk.go
- pod_scheduling_context_list.go
- pod_scheduling_context_list_gvk.go
- pod_scheduling_context_spec.go
- pod_scheduling_context_status.go
- resource_claim.go
- resource_claim_consumer_reference.go
- resource_claim_gvk.go
- resource_claim_list.go
- resource_claim_list_gvk.go
- resource_claim_parameters.go
- resource_claim_parameters_gvk.go
- resource_claim_parameters_list.go
- resource_claim_parameters_list_gvk.go
- resource_claim_parameters_reference.go
- resource_claim_scheduling_status.go
- resource_claim_spec.go
- resource_claim_status.go
- resource_claim_template.go
- resource_claim_template_gvk.go
- resource_claim_template_list.go
- resource_claim_template_list_gvk.go
- resource_claim_template_spec.go
- resource_class.go
- resource_class_gvk.go
- resource_class_list.go
- resource_class_list_gvk.go
- resource_class_parameters.go
- resource_class_parameters_gvk.go
- resource_class_parameters_list.go
- resource_class_parameters_list_gvk.go
- resource_class_parameters_reference.go
- resource_filter.go
- resource_handle.go
- resource_request.go
- resource_slice.go
- resource_slice_gvk.go
- resource_slice_list.go
- resource_slice_list_gvk.go
- structured_resource_handle.go
- vendor_parameters.go