Documentation ¶
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type AllocationResult
- type PodScheduling
- type PodSchedulingList
- type PodSchedulingSpec
- type PodSchedulingStatus
- type ResourceClaim
- type ResourceClaimConsumerReference
- type ResourceClaimList
- type ResourceClaimParametersReference
- type ResourceClaimSchedulingStatus
- type ResourceClaimSpec
- type ResourceClaimStatus
- type ResourceClaimTemplate
- type ResourceClaimTemplateList
- type ResourceClaimTemplateSpec
- type ResourceClass
- type ResourceClassList
- type ResourceClassParametersReference
Constants ¶
const GroupName = "resource.k8s.io"
GroupName is the group name use in this package
Variables ¶
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
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 driver 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"` // ResourceHandle contains arbitrary data returned by the driver after a successful allocation. This is opaque for Kubernetes. Driver documentation may explain to users how to interpret this data if needed. // // The maximum size of this field is 16KiB. This may get increased in the future, but not reduced. ResourceHandle string `json:"resourceHandle,omitempty"` Shareable bool `json:"shareable,omitempty"` }
AllocationResult AllocationResult contains attributed of an allocated resource.
swagger:model AllocationResult
type PodScheduling ¶
type PodScheduling 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 *PodSchedulingSpec `json:"spec"` // Status describes where resources for the Pod can be allocated. Status *PodSchedulingStatus `json:"status,omitempty"` }
PodScheduling PodScheduling 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 PodScheduling
func (*PodScheduling) GroupVersionKind ¶
func (v *PodScheduling) GroupVersionKind() schema.GroupVersionKind
type PodSchedulingList ¶
type PodSchedulingList 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 PodScheduling objects. // Required: true Items []*PodScheduling `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"` }
PodSchedulingList PodSchedulingList is a collection of Pod scheduling objects.
swagger:model PodSchedulingList
func (*PodSchedulingList) GroupVersionKind ¶
func (v *PodSchedulingList) GroupVersionKind() schema.GroupVersionKind
type PodSchedulingSpec ¶
type PodSchedulingSpec 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"` }
PodSchedulingSpec PodSchedulingSpec describes where resources for the Pod are needed.
swagger:model PodSchedulingSpec
type PodSchedulingStatus ¶
type PodSchedulingStatus struct { // ResourceClaims describes resource availability for each pod.spec.resourceClaim entry where the corresponding ResourceClaim uses "WaitForFirstConsumer" allocation mode. ResourceClaims []*ResourceClaimSchedulingStatus `json:"resourceClaims,omitempty"` }
PodSchedulingStatus PodSchedulingStatus describes where resources for the Pod can be allocated.
swagger:model PodSchedulingStatus
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 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 has been allocated successfully. If this is not specified, the resource is not yet allocated. 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"` // 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 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
Source Files ¶
- allocation_result.go
- group_info.go
- pod_scheduling.go
- pod_scheduling_gvk.go
- pod_scheduling_list.go
- pod_scheduling_list_gvk.go
- pod_scheduling_spec.go
- pod_scheduling_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_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_reference.go