mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
rebase: bump k8s.io/kubernetes in the k8s-dependencies group
Bumps the k8s-dependencies group with 1 update: [k8s.io/kubernetes](https://github.com/kubernetes/kubernetes). Updates `k8s.io/kubernetes` from 1.32.3 to 1.33.0 - [Release notes](https://github.com/kubernetes/kubernetes/releases) - [Commits](https://github.com/kubernetes/kubernetes/compare/v1.32.3...v1.33.0) --- updated-dependencies: - dependency-name: k8s.io/kubernetes dependency-version: 1.33.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: k8s-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
4147d5d15a
commit
51895f8619
2
vendor/k8s.io/api/resource/v1alpha3/doc.go
generated
vendored
2
vendor/k8s.io/api/resource/v1alpha3/doc.go
generated
vendored
@ -21,4 +21,4 @@ limitations under the License.
|
||||
// +groupName=resource.k8s.io
|
||||
|
||||
// Package v1alpha3 is the v1alpha3 version of the resource API.
|
||||
package v1alpha3 // import "k8s.io/api/resource/v1alpha3"
|
||||
package v1alpha3
|
||||
|
3757
vendor/k8s.io/api/resource/v1alpha3/generated.pb.go
generated
vendored
3757
vendor/k8s.io/api/resource/v1alpha3/generated.pb.go
generated
vendored
File diff suppressed because it is too large
Load Diff
514
vendor/k8s.io/api/resource/v1alpha3/generated.proto
generated
vendored
514
vendor/k8s.io/api/resource/v1alpha3/generated.proto
generated
vendored
@ -62,6 +62,8 @@ message AllocatedDeviceStatus {
|
||||
// If the device has been configured according to the class and claim
|
||||
// config references, the `Ready` condition should be True.
|
||||
//
|
||||
// Must not contain more than 8 entries.
|
||||
//
|
||||
// +optional
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
@ -111,6 +113,64 @@ message BasicDevice {
|
||||
//
|
||||
// +optional
|
||||
map<string, .k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 2;
|
||||
|
||||
// ConsumesCounters defines a list of references to sharedCounters
|
||||
// and the set of counters that the device will
|
||||
// consume from those counter sets.
|
||||
//
|
||||
// There can only be a single entry per counterSet.
|
||||
//
|
||||
// The total number of device counter consumption entries
|
||||
// must be <= 32. In addition, the total number in the
|
||||
// entire ResourceSlice must be <= 1024 (for example,
|
||||
// 64 devices with 16 counters each).
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRAPartitionableDevices
|
||||
repeated DeviceCounterConsumption consumesCounters = 3;
|
||||
|
||||
// NodeName identifies the node where the device is available.
|
||||
//
|
||||
// Must only be set if Spec.PerDeviceNodeSelection is set to true.
|
||||
// At most one of NodeName, NodeSelector and AllNodes can be set.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=DeviceNodeSelection
|
||||
// +featureGate=DRAPartitionableDevices
|
||||
optional string nodeName = 4;
|
||||
|
||||
// NodeSelector defines the nodes where the device is available.
|
||||
//
|
||||
// Must only be set if Spec.PerDeviceNodeSelection is set to true.
|
||||
// At most one of NodeName, NodeSelector and AllNodes can be set.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=DeviceNodeSelection
|
||||
// +featureGate=DRAPartitionableDevices
|
||||
optional .k8s.io.api.core.v1.NodeSelector nodeSelector = 5;
|
||||
|
||||
// AllNodes indicates that all nodes have access to the device.
|
||||
//
|
||||
// Must only be set if Spec.PerDeviceNodeSelection is set to true.
|
||||
// At most one of NodeName, NodeSelector and AllNodes can be set.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=DeviceNodeSelection
|
||||
// +featureGate=DRAPartitionableDevices
|
||||
optional bool allNodes = 6;
|
||||
|
||||
// If specified, these are the driver-defined taints.
|
||||
//
|
||||
// The maximum number of taints is 4.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
repeated DeviceTaint taints = 7;
|
||||
}
|
||||
|
||||
// CELDeviceSelector contains a CEL expression for selecting a device.
|
||||
@ -170,6 +230,42 @@ message CELDeviceSelector {
|
||||
optional string expression = 1;
|
||||
}
|
||||
|
||||
// Counter describes a quantity associated with a device.
|
||||
message Counter {
|
||||
// Value defines how much of a certain device counter is available.
|
||||
//
|
||||
// +required
|
||||
optional .k8s.io.apimachinery.pkg.api.resource.Quantity value = 1;
|
||||
}
|
||||
|
||||
// CounterSet defines a named set of counters
|
||||
// that are available to be used by devices defined in the
|
||||
// ResourceSlice.
|
||||
//
|
||||
// The counters are not allocatable by themselves, but
|
||||
// can be referenced by devices. When a device is allocated,
|
||||
// the portion of counters it uses will no longer be available for use
|
||||
// by other devices.
|
||||
message CounterSet {
|
||||
// CounterSet is the name of the set from which the
|
||||
// counters defined will be consumed.
|
||||
//
|
||||
// +required
|
||||
optional string name = 1;
|
||||
|
||||
// Counters defines the counters that will be consumed by the device.
|
||||
// The name of each counter must be unique in that set and must be a DNS label.
|
||||
//
|
||||
// To ensure this uniqueness, capacities defined by the vendor
|
||||
// must be listed without the driver name as domain prefix in
|
||||
// their name. All others must be listed with their domain prefix.
|
||||
//
|
||||
// The maximum number of counters is 32.
|
||||
//
|
||||
// +required
|
||||
map<string, Counter> counters = 2;
|
||||
}
|
||||
|
||||
// Device represents one individual hardware instance that can be selected based
|
||||
// on its attributes. Besides the name, exactly one field must be set.
|
||||
message Device {
|
||||
@ -198,6 +294,10 @@ message DeviceAllocationConfiguration {
|
||||
// Requests lists the names of requests where the configuration applies.
|
||||
// If empty, its applies to all requests.
|
||||
//
|
||||
// References to subrequests must include the name of the main request
|
||||
// and may include the subrequest using the format <main request>[/<subrequest>]. If just
|
||||
// the main request is given, the configuration applies to all subrequests.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated string requests = 2;
|
||||
@ -284,6 +384,10 @@ message DeviceClaimConfiguration {
|
||||
// Requests lists the names of requests where the configuration applies.
|
||||
// If empty, it applies to all requests.
|
||||
//
|
||||
// References to subrequests must include the name of the main request
|
||||
// and may include the subrequest using the format <main request>[/<subrequest>]. If just
|
||||
// the main request is given, the configuration applies to all subrequests.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated string requests = 1;
|
||||
@ -368,6 +472,10 @@ message DeviceConstraint {
|
||||
// constraint. If this is not specified, this constraint applies to all
|
||||
// requests in this claim.
|
||||
//
|
||||
// References to subrequests must include the name of the main request
|
||||
// and may include the subrequest using the format <main request>[/<subrequest>]. If just
|
||||
// the main request is given, the constraint applies to all subrequests.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated string requests = 1;
|
||||
@ -390,14 +498,30 @@ message DeviceConstraint {
|
||||
optional string matchAttribute = 2;
|
||||
}
|
||||
|
||||
// DeviceCounterConsumption defines a set of counters that
|
||||
// a device will consume from a CounterSet.
|
||||
message DeviceCounterConsumption {
|
||||
// CounterSet defines the set from which the
|
||||
// counters defined will be consumed.
|
||||
//
|
||||
// +required
|
||||
optional string counterSet = 1;
|
||||
|
||||
// Counters defines the Counter that will be consumed by
|
||||
// the device.
|
||||
//
|
||||
// The maximum number counters in a device is 32.
|
||||
// In addition, the maximum number of all counters
|
||||
// in all devices is 1024 (for example, 64 devices with
|
||||
// 16 counters each).
|
||||
//
|
||||
// +required
|
||||
map<string, Counter> counters = 2;
|
||||
}
|
||||
|
||||
// DeviceRequest is a request for devices required for a claim.
|
||||
// This is typically a request for a single resource like a device, but can
|
||||
// also ask for several identical devices.
|
||||
//
|
||||
// A DeviceClassName is currently required. Clients must check that it is
|
||||
// indeed set. It's absence indicates that something changed in a way that
|
||||
// is not supported by the client yet, in which case it must refuse to
|
||||
// handle the request.
|
||||
message DeviceRequest {
|
||||
// Name can be used to reference this request in a pod.spec.containers[].resources.claims
|
||||
// entry and in a constraint of the claim.
|
||||
@ -411,7 +535,10 @@ message DeviceRequest {
|
||||
// additional configuration and selectors to be inherited by this
|
||||
// request.
|
||||
//
|
||||
// A class is required. Which classes are available depends on the cluster.
|
||||
// A class is required if no subrequests are specified in the
|
||||
// firstAvailable list and no class can be set if subrequests
|
||||
// are specified in the firstAvailable list.
|
||||
// Which classes are available depends on the cluster.
|
||||
//
|
||||
// Administrators may use this to restrict which devices may get
|
||||
// requested by only installing classes with selectors for permitted
|
||||
@ -419,7 +546,8 @@ message DeviceRequest {
|
||||
// then administrators can create an empty DeviceClass for users
|
||||
// to reference.
|
||||
//
|
||||
// +required
|
||||
// +optional
|
||||
// +oneOf=deviceRequestType
|
||||
optional string deviceClassName = 2;
|
||||
|
||||
// Selectors define criteria which must be satisfied by a specific
|
||||
@ -427,6 +555,9 @@ message DeviceRequest {
|
||||
// request. All selectors must be satisfied for a device to be
|
||||
// considered.
|
||||
//
|
||||
// This field can only be set when deviceClassName is set and no subrequests
|
||||
// are specified in the firstAvailable list.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated DeviceSelector selectors = 3;
|
||||
@ -439,13 +570,17 @@ message DeviceRequest {
|
||||
// count field.
|
||||
//
|
||||
// - All: This request is for all of the matching devices in a pool.
|
||||
// At least one device must exist on the node for the allocation to succeed.
|
||||
// Allocation will fail if some devices are already allocated,
|
||||
// unless adminAccess is requested.
|
||||
//
|
||||
// If AlloctionMode is not specified, the default mode is ExactCount. If
|
||||
// If AllocationMode is not specified, the default mode is ExactCount. If
|
||||
// the mode is ExactCount and count is not specified, the default count is
|
||||
// one. Any other requests must specify this field.
|
||||
//
|
||||
// This field can only be set when deviceClassName is set and no subrequests
|
||||
// are specified in the firstAvailable list.
|
||||
//
|
||||
// More modes may get added in the future. Clients must refuse to handle
|
||||
// requests with unknown modes.
|
||||
//
|
||||
@ -455,6 +590,9 @@ message DeviceRequest {
|
||||
// Count is used only when the count mode is "ExactCount". Must be greater than zero.
|
||||
// If AllocationMode is ExactCount and this field is not specified, the default is one.
|
||||
//
|
||||
// This field can only be set when deviceClassName is set and no subrequests
|
||||
// are specified in the firstAvailable list.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=AllocationMode
|
||||
optional int64 count = 5;
|
||||
@ -465,6 +603,9 @@ message DeviceRequest {
|
||||
// all ordinary claims to the device with respect to access modes and
|
||||
// any resource allocations.
|
||||
//
|
||||
// This field can only be set when deviceClassName is set and no subrequests
|
||||
// are specified in the firstAvailable list.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRAAdminAccess
|
||||
// feature gate. Admin access is disabled if this field is unset or
|
||||
// set to false, otherwise it is enabled.
|
||||
@ -472,13 +613,65 @@ message DeviceRequest {
|
||||
// +optional
|
||||
// +featureGate=DRAAdminAccess
|
||||
optional bool adminAccess = 6;
|
||||
|
||||
// FirstAvailable contains subrequests, of which exactly one will be
|
||||
// satisfied by the scheduler to satisfy this request. It tries to
|
||||
// satisfy them in the order in which they are listed here. So if
|
||||
// there are two entries in the list, the scheduler will only check
|
||||
// the second one if it determines that the first one cannot be used.
|
||||
//
|
||||
// This field may only be set in the entries of DeviceClaim.Requests.
|
||||
//
|
||||
// DRA does not yet implement scoring, so the scheduler will
|
||||
// select the first set of devices that satisfies all the
|
||||
// requests in the claim. And if the requirements can
|
||||
// be satisfied on more than one node, other scheduling features
|
||||
// will determine which node is chosen. This means that the set of
|
||||
// devices allocated to a claim might not be the optimal set
|
||||
// available to the cluster. Scoring will be implemented later.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=deviceRequestType
|
||||
// +listType=atomic
|
||||
// +featureGate=DRAPrioritizedList
|
||||
repeated DeviceSubRequest firstAvailable = 7;
|
||||
|
||||
// If specified, the request's tolerations.
|
||||
//
|
||||
// Tolerations for NoSchedule are required to allocate a
|
||||
// device which has a taint with that effect. The same applies
|
||||
// to NoExecute.
|
||||
//
|
||||
// In addition, should any of the allocated devices get tainted
|
||||
// with NoExecute after allocation and that effect is not tolerated,
|
||||
// then all pods consuming the ResourceClaim get deleted to evict
|
||||
// them. The scheduler will not let new pods reserve the claim while
|
||||
// it has these tainted devices. Once all pods are evicted, the
|
||||
// claim will get deallocated.
|
||||
//
|
||||
// The maximum number of tolerations is 16.
|
||||
//
|
||||
// This field can only be set when deviceClassName is set and no subrequests
|
||||
// are specified in the firstAvailable list.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
repeated DeviceToleration tolerations = 8;
|
||||
}
|
||||
|
||||
// DeviceRequestAllocationResult contains the allocation result for one request.
|
||||
message DeviceRequestAllocationResult {
|
||||
// Request is the name of the request in the claim which caused this
|
||||
// device to be allocated. Multiple devices may have been allocated
|
||||
// per request.
|
||||
// device to be allocated. If it references a subrequest in the
|
||||
// firstAvailable list on a DeviceRequest, this field must
|
||||
// include both the name of the main request and the subrequest
|
||||
// using the format <main request>/<subrequest>.
|
||||
//
|
||||
// Multiple devices may have been allocated per request.
|
||||
//
|
||||
// +required
|
||||
optional string request = 1;
|
||||
@ -519,6 +712,19 @@ message DeviceRequestAllocationResult {
|
||||
// +optional
|
||||
// +featureGate=DRAAdminAccess
|
||||
optional bool adminAccess = 5;
|
||||
|
||||
// A copy of all tolerations specified in the request at the time
|
||||
// when the device got allocated.
|
||||
//
|
||||
// The maximum number of tolerations is 16.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
repeated DeviceToleration tolerations = 6;
|
||||
}
|
||||
|
||||
// DeviceSelector must have exactly one field set.
|
||||
@ -530,6 +736,262 @@ message DeviceSelector {
|
||||
optional CELDeviceSelector cel = 1;
|
||||
}
|
||||
|
||||
// DeviceSubRequest describes a request for device provided in the
|
||||
// claim.spec.devices.requests[].firstAvailable array. Each
|
||||
// is typically a request for a single resource like a device, but can
|
||||
// also ask for several identical devices.
|
||||
//
|
||||
// DeviceSubRequest is similar to Request, but doesn't expose the AdminAccess
|
||||
// or FirstAvailable fields, as those can only be set on the top-level request.
|
||||
// AdminAccess is not supported for requests with a prioritized list, and
|
||||
// recursive FirstAvailable fields are not supported.
|
||||
message DeviceSubRequest {
|
||||
// Name can be used to reference this subrequest in the list of constraints
|
||||
// or the list of configurations for the claim. References must use the
|
||||
// format <main request>/<subrequest>.
|
||||
//
|
||||
// Must be a DNS label.
|
||||
//
|
||||
// +required
|
||||
optional string name = 1;
|
||||
|
||||
// DeviceClassName references a specific DeviceClass, which can define
|
||||
// additional configuration and selectors to be inherited by this
|
||||
// subrequest.
|
||||
//
|
||||
// A class is required. Which classes are available depends on the cluster.
|
||||
//
|
||||
// Administrators may use this to restrict which devices may get
|
||||
// requested by only installing classes with selectors for permitted
|
||||
// devices. If users are free to request anything without restrictions,
|
||||
// then administrators can create an empty DeviceClass for users
|
||||
// to reference.
|
||||
//
|
||||
// +required
|
||||
optional string deviceClassName = 2;
|
||||
|
||||
// Selectors define criteria which must be satisfied by a specific
|
||||
// device in order for that device to be considered for this
|
||||
// request. All selectors must be satisfied for a device to be
|
||||
// considered.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated DeviceSelector selectors = 3;
|
||||
|
||||
// AllocationMode and its related fields define how devices are allocated
|
||||
// to satisfy this request. Supported values are:
|
||||
//
|
||||
// - ExactCount: This request is for a specific number of devices.
|
||||
// This is the default. The exact number is provided in the
|
||||
// count field.
|
||||
//
|
||||
// - All: This request is for all of the matching devices in a pool.
|
||||
// Allocation will fail if some devices are already allocated,
|
||||
// unless adminAccess is requested.
|
||||
//
|
||||
// If AllocationMode is not specified, the default mode is ExactCount. If
|
||||
// the mode is ExactCount and count is not specified, the default count is
|
||||
// one. Any other requests must specify this field.
|
||||
//
|
||||
// More modes may get added in the future. Clients must refuse to handle
|
||||
// requests with unknown modes.
|
||||
//
|
||||
// +optional
|
||||
optional string allocationMode = 4;
|
||||
|
||||
// Count is used only when the count mode is "ExactCount". Must be greater than zero.
|
||||
// If AllocationMode is ExactCount and this field is not specified, the default is one.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=AllocationMode
|
||||
optional int64 count = 5;
|
||||
|
||||
// If specified, the request's tolerations.
|
||||
//
|
||||
// Tolerations for NoSchedule are required to allocate a
|
||||
// device which has a taint with that effect. The same applies
|
||||
// to NoExecute.
|
||||
//
|
||||
// In addition, should any of the allocated devices get tainted
|
||||
// with NoExecute after allocation and that effect is not tolerated,
|
||||
// then all pods consuming the ResourceClaim get deleted to evict
|
||||
// them. The scheduler will not let new pods reserve the claim while
|
||||
// it has these tainted devices. Once all pods are evicted, the
|
||||
// claim will get deallocated.
|
||||
//
|
||||
// The maximum number of tolerations is 16.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
repeated DeviceToleration tolerations = 7;
|
||||
}
|
||||
|
||||
// The device this taint is attached to has the "effect" on
|
||||
// any claim which does not tolerate the taint and, through the claim,
|
||||
// to pods using the claim.
|
||||
message DeviceTaint {
|
||||
// The taint key to be applied to a device.
|
||||
// Must be a label name.
|
||||
//
|
||||
// +required
|
||||
optional string key = 1;
|
||||
|
||||
// The taint value corresponding to the taint key.
|
||||
// Must be a label value.
|
||||
//
|
||||
// +optional
|
||||
optional string value = 2;
|
||||
|
||||
// The effect of the taint on claims that do not tolerate the taint
|
||||
// and through such claims on the pods using them.
|
||||
// Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here.
|
||||
//
|
||||
// +required
|
||||
optional string effect = 3;
|
||||
|
||||
// TimeAdded represents the time at which the taint was added.
|
||||
// Added automatically during create or update if not set.
|
||||
//
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time timeAdded = 4;
|
||||
}
|
||||
|
||||
// DeviceTaintRule adds one taint to all devices which match the selector.
|
||||
// This has the same effect as if the taint was specified directly
|
||||
// in the ResourceSlice by the DRA driver.
|
||||
message DeviceTaintRule {
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec specifies the selector and one taint.
|
||||
//
|
||||
// Changing the spec automatically increments the metadata.generation number.
|
||||
optional DeviceTaintRuleSpec spec = 2;
|
||||
}
|
||||
|
||||
// DeviceTaintRuleList is a collection of DeviceTaintRules.
|
||||
message DeviceTaintRuleList {
|
||||
// Standard list metadata
|
||||
// +optional
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of DeviceTaintRules.
|
||||
repeated DeviceTaintRule items = 2;
|
||||
}
|
||||
|
||||
// DeviceTaintRuleSpec specifies the selector and one taint.
|
||||
message DeviceTaintRuleSpec {
|
||||
// DeviceSelector defines which device(s) the taint is applied to.
|
||||
// All selector criteria must be satified for a device to
|
||||
// match. The empty selector matches all devices. Without
|
||||
// a selector, no devices are matches.
|
||||
//
|
||||
// +optional
|
||||
optional DeviceTaintSelector deviceSelector = 1;
|
||||
|
||||
// The taint that gets applied to matching devices.
|
||||
//
|
||||
// +required
|
||||
optional DeviceTaint taint = 2;
|
||||
}
|
||||
|
||||
// DeviceTaintSelector defines which device(s) a DeviceTaintRule applies to.
|
||||
// The empty selector matches all devices. Without a selector, no devices
|
||||
// are matched.
|
||||
message DeviceTaintSelector {
|
||||
// If DeviceClassName is set, the selectors defined there must be
|
||||
// satisfied by a device to be selected. This field corresponds
|
||||
// to class.metadata.name.
|
||||
//
|
||||
// +optional
|
||||
optional string deviceClassName = 1;
|
||||
|
||||
// If driver is set, only devices from that driver are selected.
|
||||
// This fields corresponds to slice.spec.driver.
|
||||
//
|
||||
// +optional
|
||||
optional string driver = 2;
|
||||
|
||||
// If pool is set, only devices in that pool are selected.
|
||||
//
|
||||
// Also setting the driver name may be useful to avoid
|
||||
// ambiguity when different drivers use the same pool name,
|
||||
// but this is not required because selecting pools from
|
||||
// different drivers may also be useful, for example when
|
||||
// drivers with node-local devices use the node name as
|
||||
// their pool name.
|
||||
//
|
||||
// +optional
|
||||
optional string pool = 3;
|
||||
|
||||
// If device is set, only devices with that name are selected.
|
||||
// This field corresponds to slice.spec.devices[].name.
|
||||
//
|
||||
// Setting also driver and pool may be required to avoid ambiguity,
|
||||
// but is not required.
|
||||
//
|
||||
// +optional
|
||||
optional string device = 4;
|
||||
|
||||
// Selectors contains the same selection criteria as a ResourceClaim.
|
||||
// Currently, CEL expressions are supported. All of these selectors
|
||||
// must be satisfied.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated DeviceSelector selectors = 5;
|
||||
}
|
||||
|
||||
// The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches
|
||||
// the triple <key,value,effect> using the matching operator <operator>.
|
||||
message DeviceToleration {
|
||||
// Key is the taint key that the toleration applies to. Empty means match all taint keys.
|
||||
// If the key is empty, operator must be Exists; this combination means to match all values and all keys.
|
||||
// Must be a label name.
|
||||
//
|
||||
// +optional
|
||||
optional string key = 1;
|
||||
|
||||
// Operator represents a key's relationship to the value.
|
||||
// Valid operators are Exists and Equal. Defaults to Equal.
|
||||
// Exists is equivalent to wildcard for value, so that a ResourceClaim can
|
||||
// tolerate all taints of a particular category.
|
||||
//
|
||||
// +optional
|
||||
// +default="Equal"
|
||||
optional string operator = 2;
|
||||
|
||||
// Value is the taint value the toleration matches to.
|
||||
// If the operator is Exists, the value must be empty, otherwise just a regular string.
|
||||
// Must be a label value.
|
||||
//
|
||||
// +optional
|
||||
optional string value = 3;
|
||||
|
||||
// Effect indicates the taint effect to match. Empty means match all taint effects.
|
||||
// When specified, allowed values are NoSchedule and NoExecute.
|
||||
//
|
||||
// +optional
|
||||
optional string effect = 4;
|
||||
|
||||
// TolerationSeconds represents the period of time the toleration (which must be
|
||||
// of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
|
||||
// it is not set, which means tolerate the taint forever (do not evict). Zero and
|
||||
// negative values will be treated as 0 (evict immediately) by the system.
|
||||
// If larger than zero, the time when the pod needs to be evicted is calculated as <time when
|
||||
// taint was adedd> + <toleration seconds>.
|
||||
//
|
||||
// +optional
|
||||
optional int64 tolerationSeconds = 5;
|
||||
}
|
||||
|
||||
// NetworkDeviceData provides network-related details for the allocated device.
|
||||
// This information may be filled by drivers or other components to configure
|
||||
// or identify the device within a network context.
|
||||
@ -549,6 +1011,8 @@ message NetworkDeviceData {
|
||||
// associated subnet mask.
|
||||
// e.g.: "192.0.2.5/24" for IPv4 and "2001:db8::5/64" for IPv6.
|
||||
//
|
||||
// Must not contain more than 16 entries.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated string ips = 2;
|
||||
@ -847,7 +1311,7 @@ message ResourceSliceSpec {
|
||||
// new nodes of the same type as some old node might also make new
|
||||
// resources available.
|
||||
//
|
||||
// Exactly one of NodeName, NodeSelector and AllNodes must be set.
|
||||
// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
|
||||
// This field is immutable.
|
||||
//
|
||||
// +optional
|
||||
@ -859,7 +1323,7 @@ message ResourceSliceSpec {
|
||||
//
|
||||
// Must use exactly one term.
|
||||
//
|
||||
// Exactly one of NodeName, NodeSelector and AllNodes must be set.
|
||||
// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=NodeSelection
|
||||
@ -867,7 +1331,7 @@ message ResourceSliceSpec {
|
||||
|
||||
// AllNodes indicates that all nodes have access to the resources in the pool.
|
||||
//
|
||||
// Exactly one of NodeName, NodeSelector and AllNodes must be set.
|
||||
// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=NodeSelection
|
||||
@ -880,5 +1344,29 @@ message ResourceSliceSpec {
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
repeated Device devices = 6;
|
||||
|
||||
// PerDeviceNodeSelection defines whether the access from nodes to
|
||||
// resources in the pool is set on the ResourceSlice level or on each
|
||||
// device. If it is set to true, every device defined the ResourceSlice
|
||||
// must specify this individually.
|
||||
//
|
||||
// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=NodeSelection
|
||||
// +featureGate=DRAPartitionableDevices
|
||||
optional bool perDeviceNodeSelection = 7;
|
||||
|
||||
// SharedCounters defines a list of counter sets, each of which
|
||||
// has a name and a list of counters available.
|
||||
//
|
||||
// The names of the SharedCounters must be unique in the ResourceSlice.
|
||||
//
|
||||
// The maximum number of SharedCounters is 32.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRAPartitionableDevices
|
||||
repeated CounterSet sharedCounters = 8;
|
||||
}
|
||||
|
||||
|
2
vendor/k8s.io/api/resource/v1alpha3/register.go
generated
vendored
2
vendor/k8s.io/api/resource/v1alpha3/register.go
generated
vendored
@ -52,6 +52,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
&ResourceClaimTemplateList{},
|
||||
&ResourceSlice{},
|
||||
&ResourceSliceList{},
|
||||
&DeviceTaintRule{},
|
||||
&DeviceTaintRuleList{},
|
||||
)
|
||||
|
||||
// Add the watch version that applies
|
||||
|
625
vendor/k8s.io/api/resource/v1alpha3/types.go
generated
vendored
625
vendor/k8s.io/api/resource/v1alpha3/types.go
generated
vendored
@ -110,7 +110,7 @@ type ResourceSliceSpec struct {
|
||||
// new nodes of the same type as some old node might also make new
|
||||
// resources available.
|
||||
//
|
||||
// Exactly one of NodeName, NodeSelector and AllNodes must be set.
|
||||
// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
|
||||
// This field is immutable.
|
||||
//
|
||||
// +optional
|
||||
@ -122,7 +122,7 @@ type ResourceSliceSpec struct {
|
||||
//
|
||||
// Must use exactly one term.
|
||||
//
|
||||
// Exactly one of NodeName, NodeSelector and AllNodes must be set.
|
||||
// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=NodeSelection
|
||||
@ -130,7 +130,7 @@ type ResourceSliceSpec struct {
|
||||
|
||||
// AllNodes indicates that all nodes have access to the resources in the pool.
|
||||
//
|
||||
// Exactly one of NodeName, NodeSelector and AllNodes must be set.
|
||||
// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=NodeSelection
|
||||
@ -143,6 +143,66 @@ type ResourceSliceSpec struct {
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
Devices []Device `json:"devices" protobuf:"bytes,6,name=devices"`
|
||||
|
||||
// PerDeviceNodeSelection defines whether the access from nodes to
|
||||
// resources in the pool is set on the ResourceSlice level or on each
|
||||
// device. If it is set to true, every device defined the ResourceSlice
|
||||
// must specify this individually.
|
||||
//
|
||||
// Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=NodeSelection
|
||||
// +featureGate=DRAPartitionableDevices
|
||||
PerDeviceNodeSelection *bool `json:"perDeviceNodeSelection,omitempty" protobuf:"bytes,7,name=perDeviceNodeSelection"`
|
||||
|
||||
// SharedCounters defines a list of counter sets, each of which
|
||||
// has a name and a list of counters available.
|
||||
//
|
||||
// The names of the SharedCounters must be unique in the ResourceSlice.
|
||||
//
|
||||
// The maximum number of SharedCounters is 32.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRAPartitionableDevices
|
||||
SharedCounters []CounterSet `json:"sharedCounters,omitempty" protobuf:"bytes,8,name=sharedCounters"`
|
||||
}
|
||||
|
||||
// CounterSet defines a named set of counters
|
||||
// that are available to be used by devices defined in the
|
||||
// ResourceSlice.
|
||||
//
|
||||
// The counters are not allocatable by themselves, but
|
||||
// can be referenced by devices. When a device is allocated,
|
||||
// the portion of counters it uses will no longer be available for use
|
||||
// by other devices.
|
||||
type CounterSet struct {
|
||||
// CounterSet is the name of the set from which the
|
||||
// counters defined will be consumed.
|
||||
//
|
||||
// +required
|
||||
Name string `json:"name" protobuf:"bytes,1,name=name"`
|
||||
|
||||
// Counters defines the counters that will be consumed by the device.
|
||||
// The name of each counter must be unique in that set and must be a DNS label.
|
||||
//
|
||||
// To ensure this uniqueness, capacities defined by the vendor
|
||||
// must be listed without the driver name as domain prefix in
|
||||
// their name. All others must be listed with their domain prefix.
|
||||
//
|
||||
// The maximum number of counters is 32.
|
||||
//
|
||||
// +required
|
||||
Counters map[string]Counter `json:"counters,omitempty" protobuf:"bytes,2,name=counters"`
|
||||
}
|
||||
|
||||
// Counter describes a quantity associated with a device.
|
||||
type Counter struct {
|
||||
// Value defines how much of a certain device counter is available.
|
||||
//
|
||||
// +required
|
||||
Value resource.Quantity `json:"value" protobuf:"bytes,1,rep,name=value"`
|
||||
}
|
||||
|
||||
// DriverNameMaxLength is the maximum valid length of a driver name in the
|
||||
@ -223,11 +283,98 @@ type BasicDevice struct {
|
||||
//
|
||||
// +optional
|
||||
Capacity map[QualifiedName]resource.Quantity `json:"capacity,omitempty" protobuf:"bytes,2,rep,name=capacity"`
|
||||
|
||||
// ConsumesCounters defines a list of references to sharedCounters
|
||||
// and the set of counters that the device will
|
||||
// consume from those counter sets.
|
||||
//
|
||||
// There can only be a single entry per counterSet.
|
||||
//
|
||||
// The total number of device counter consumption entries
|
||||
// must be <= 32. In addition, the total number in the
|
||||
// entire ResourceSlice must be <= 1024 (for example,
|
||||
// 64 devices with 16 counters each).
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRAPartitionableDevices
|
||||
ConsumesCounters []DeviceCounterConsumption `json:"consumesCounters,omitempty" protobuf:"bytes,3,rep,name=consumesCounters"`
|
||||
|
||||
// NodeName identifies the node where the device is available.
|
||||
//
|
||||
// Must only be set if Spec.PerDeviceNodeSelection is set to true.
|
||||
// At most one of NodeName, NodeSelector and AllNodes can be set.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=DeviceNodeSelection
|
||||
// +featureGate=DRAPartitionableDevices
|
||||
NodeName *string `json:"nodeName,omitempty" protobuf:"bytes,4,opt,name=nodeName"`
|
||||
|
||||
// NodeSelector defines the nodes where the device is available.
|
||||
//
|
||||
// Must only be set if Spec.PerDeviceNodeSelection is set to true.
|
||||
// At most one of NodeName, NodeSelector and AllNodes can be set.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=DeviceNodeSelection
|
||||
// +featureGate=DRAPartitionableDevices
|
||||
NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,5,opt,name=nodeSelector"`
|
||||
|
||||
// AllNodes indicates that all nodes have access to the device.
|
||||
//
|
||||
// Must only be set if Spec.PerDeviceNodeSelection is set to true.
|
||||
// At most one of NodeName, NodeSelector and AllNodes can be set.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=DeviceNodeSelection
|
||||
// +featureGate=DRAPartitionableDevices
|
||||
AllNodes *bool `json:"allNodes,omitempty" protobuf:"bytes,6,opt,name=allNodes"`
|
||||
|
||||
// If specified, these are the driver-defined taints.
|
||||
//
|
||||
// The maximum number of taints is 4.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
Taints []DeviceTaint `json:"taints,omitempty" protobuf:"bytes,7,rep,name=taints"`
|
||||
}
|
||||
|
||||
// DeviceCounterConsumption defines a set of counters that
|
||||
// a device will consume from a CounterSet.
|
||||
type DeviceCounterConsumption struct {
|
||||
// CounterSet defines the set from which the
|
||||
// counters defined will be consumed.
|
||||
//
|
||||
// +required
|
||||
CounterSet string `json:"counterSet" protobuf:"bytes,1,opt,name=counterSet"`
|
||||
|
||||
// Counters defines the Counter that will be consumed by
|
||||
// the device.
|
||||
//
|
||||
// The maximum number counters in a device is 32.
|
||||
// In addition, the maximum number of all counters
|
||||
// in all devices is 1024 (for example, 64 devices with
|
||||
// 16 counters each).
|
||||
//
|
||||
// +required
|
||||
Counters map[string]Counter `json:"counters,omitempty" protobuf:"bytes,2,opt,name=counters"`
|
||||
}
|
||||
|
||||
// Limit for the sum of the number of entries in both attributes and capacity.
|
||||
const ResourceSliceMaxAttributesAndCapacitiesPerDevice = 32
|
||||
|
||||
// Limit for the total number of counters in each device.
|
||||
const ResourceSliceMaxCountersPerDevice = 32
|
||||
|
||||
// Limit for the total number of counters defined in devices in
|
||||
// a ResourceSlice. We want to allow up to 64 devices to specify
|
||||
// up to 16 counters, so the limit for the ResourceSlice will be 1024.
|
||||
const ResourceSliceMaxDeviceCountersPerSlice = 1024 // 64 * 16
|
||||
|
||||
// QualifiedName is the name of a device attribute or capacity.
|
||||
//
|
||||
// Attributes and capacities are defined either by the owner of the specific
|
||||
@ -290,6 +437,64 @@ type DeviceAttribute struct {
|
||||
// DeviceAttributeMaxValueLength is the maximum length of a string or version attribute value.
|
||||
const DeviceAttributeMaxValueLength = 64
|
||||
|
||||
// DeviceTaintsMaxLength is the maximum number of taints per device.
|
||||
const DeviceTaintsMaxLength = 4
|
||||
|
||||
// The device this taint is attached to has the "effect" on
|
||||
// any claim which does not tolerate the taint and, through the claim,
|
||||
// to pods using the claim.
|
||||
type DeviceTaint struct {
|
||||
// The taint key to be applied to a device.
|
||||
// Must be a label name.
|
||||
//
|
||||
// +required
|
||||
Key string `json:"key" protobuf:"bytes,1,name=key"`
|
||||
|
||||
// The taint value corresponding to the taint key.
|
||||
// Must be a label value.
|
||||
//
|
||||
// +optional
|
||||
Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
|
||||
|
||||
// The effect of the taint on claims that do not tolerate the taint
|
||||
// and through such claims on the pods using them.
|
||||
// Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for
|
||||
// nodes is not valid here.
|
||||
//
|
||||
// +required
|
||||
Effect DeviceTaintEffect `json:"effect" protobuf:"bytes,3,name=effect,casttype=DeviceTaintEffect"`
|
||||
|
||||
// ^^^^
|
||||
//
|
||||
// Implementing PreferNoSchedule would depend on a scoring solution for DRA.
|
||||
// It might get added as part of that.
|
||||
|
||||
// TimeAdded represents the time at which the taint was added.
|
||||
// Added automatically during create or update if not set.
|
||||
//
|
||||
// +optional
|
||||
TimeAdded *metav1.Time `json:"timeAdded,omitempty" protobuf:"bytes,4,opt,name=timeAdded"`
|
||||
|
||||
// ^^^
|
||||
//
|
||||
// This field was defined as "It is only written for NoExecute taints." for node taints.
|
||||
// But in practice, Kubernetes never did anything with it (no validation, no defaulting,
|
||||
// ignored during pod eviction in pkg/controller/tainteviction).
|
||||
}
|
||||
|
||||
// +enum
|
||||
type DeviceTaintEffect string
|
||||
|
||||
const (
|
||||
// Do not allow new pods to schedule which use a tainted device unless they tolerate the taint,
|
||||
// but allow all pods submitted to Kubelet without going through the scheduler
|
||||
// to start, and allow all already-running pods to continue running.
|
||||
DeviceTaintEffectNoSchedule DeviceTaintEffect = "NoSchedule"
|
||||
|
||||
// Evict any already-running pods that do not tolerate the device taint.
|
||||
DeviceTaintEffectNoExecute DeviceTaintEffect = "NoExecute"
|
||||
)
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.31
|
||||
// +k8s:prerelease-lifecycle-gen:replacement=resource.k8s.io,v1beta1,ResourceSliceList
|
||||
@ -383,14 +588,18 @@ const (
|
||||
DeviceConfigMaxSize = 32
|
||||
)
|
||||
|
||||
// DRAAdminNamespaceLabelKey is a label key used to grant administrative access
|
||||
// to certain resource.k8s.io API types within a namespace. When this label is
|
||||
// set on a namespace with the value "true" (case-sensitive), it allows the use
|
||||
// of adminAccess: true in any namespaced resource.k8s.io API types. Currently,
|
||||
// this permission applies to ResourceClaim and ResourceClaimTemplate objects.
|
||||
const (
|
||||
DRAAdminNamespaceLabelKey = "resource.k8s.io/admin-access"
|
||||
)
|
||||
|
||||
// DeviceRequest is a request for devices required for a claim.
|
||||
// This is typically a request for a single resource like a device, but can
|
||||
// also ask for several identical devices.
|
||||
//
|
||||
// A DeviceClassName is currently required. Clients must check that it is
|
||||
// indeed set. It's absence indicates that something changed in a way that
|
||||
// is not supported by the client yet, in which case it must refuse to
|
||||
// handle the request.
|
||||
type DeviceRequest struct {
|
||||
// Name can be used to reference this request in a pod.spec.containers[].resources.claims
|
||||
// entry and in a constraint of the claim.
|
||||
@ -404,6 +613,157 @@ type DeviceRequest struct {
|
||||
// additional configuration and selectors to be inherited by this
|
||||
// request.
|
||||
//
|
||||
// A class is required if no subrequests are specified in the
|
||||
// firstAvailable list and no class can be set if subrequests
|
||||
// are specified in the firstAvailable list.
|
||||
// Which classes are available depends on the cluster.
|
||||
//
|
||||
// Administrators may use this to restrict which devices may get
|
||||
// requested by only installing classes with selectors for permitted
|
||||
// devices. If users are free to request anything without restrictions,
|
||||
// then administrators can create an empty DeviceClass for users
|
||||
// to reference.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=deviceRequestType
|
||||
DeviceClassName string `json:"deviceClassName" protobuf:"bytes,2,name=deviceClassName"`
|
||||
|
||||
// Selectors define criteria which must be satisfied by a specific
|
||||
// device in order for that device to be considered for this
|
||||
// request. All selectors must be satisfied for a device to be
|
||||
// considered.
|
||||
//
|
||||
// This field can only be set when deviceClassName is set and no subrequests
|
||||
// are specified in the firstAvailable list.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,3,name=selectors"`
|
||||
|
||||
// AllocationMode and its related fields define how devices are allocated
|
||||
// to satisfy this request. Supported values are:
|
||||
//
|
||||
// - ExactCount: This request is for a specific number of devices.
|
||||
// This is the default. The exact number is provided in the
|
||||
// count field.
|
||||
//
|
||||
// - All: This request is for all of the matching devices in a pool.
|
||||
// At least one device must exist on the node for the allocation to succeed.
|
||||
// Allocation will fail if some devices are already allocated,
|
||||
// unless adminAccess is requested.
|
||||
//
|
||||
// If AllocationMode is not specified, the default mode is ExactCount. If
|
||||
// the mode is ExactCount and count is not specified, the default count is
|
||||
// one. Any other requests must specify this field.
|
||||
//
|
||||
// This field can only be set when deviceClassName is set and no subrequests
|
||||
// are specified in the firstAvailable list.
|
||||
//
|
||||
// More modes may get added in the future. Clients must refuse to handle
|
||||
// requests with unknown modes.
|
||||
//
|
||||
// +optional
|
||||
AllocationMode DeviceAllocationMode `json:"allocationMode,omitempty" protobuf:"bytes,4,opt,name=allocationMode"`
|
||||
|
||||
// Count is used only when the count mode is "ExactCount". Must be greater than zero.
|
||||
// If AllocationMode is ExactCount and this field is not specified, the default is one.
|
||||
//
|
||||
// This field can only be set when deviceClassName is set and no subrequests
|
||||
// are specified in the firstAvailable list.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=AllocationMode
|
||||
Count int64 `json:"count,omitempty" protobuf:"bytes,5,opt,name=count"`
|
||||
|
||||
// AdminAccess indicates that this is a claim for administrative access
|
||||
// to the device(s). Claims with AdminAccess are expected to be used for
|
||||
// monitoring or other management services for a device. They ignore
|
||||
// all ordinary claims to the device with respect to access modes and
|
||||
// any resource allocations.
|
||||
//
|
||||
// This field can only be set when deviceClassName is set and no subrequests
|
||||
// are specified in the firstAvailable list.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRAAdminAccess
|
||||
// feature gate. Admin access is disabled if this field is unset or
|
||||
// set to false, otherwise it is enabled.
|
||||
//
|
||||
// +optional
|
||||
// +featureGate=DRAAdminAccess
|
||||
AdminAccess *bool `json:"adminAccess,omitempty" protobuf:"bytes,6,opt,name=adminAccess"`
|
||||
|
||||
// FirstAvailable contains subrequests, of which exactly one will be
|
||||
// satisfied by the scheduler to satisfy this request. It tries to
|
||||
// satisfy them in the order in which they are listed here. So if
|
||||
// there are two entries in the list, the scheduler will only check
|
||||
// the second one if it determines that the first one cannot be used.
|
||||
//
|
||||
// This field may only be set in the entries of DeviceClaim.Requests.
|
||||
//
|
||||
// DRA does not yet implement scoring, so the scheduler will
|
||||
// select the first set of devices that satisfies all the
|
||||
// requests in the claim. And if the requirements can
|
||||
// be satisfied on more than one node, other scheduling features
|
||||
// will determine which node is chosen. This means that the set of
|
||||
// devices allocated to a claim might not be the optimal set
|
||||
// available to the cluster. Scoring will be implemented later.
|
||||
//
|
||||
// +optional
|
||||
// +oneOf=deviceRequestType
|
||||
// +listType=atomic
|
||||
// +featureGate=DRAPrioritizedList
|
||||
FirstAvailable []DeviceSubRequest `json:"firstAvailable,omitempty" protobuf:"bytes,7,name=firstAvailable"`
|
||||
|
||||
// If specified, the request's tolerations.
|
||||
//
|
||||
// Tolerations for NoSchedule are required to allocate a
|
||||
// device which has a taint with that effect. The same applies
|
||||
// to NoExecute.
|
||||
//
|
||||
// In addition, should any of the allocated devices get tainted
|
||||
// with NoExecute after allocation and that effect is not tolerated,
|
||||
// then all pods consuming the ResourceClaim get deleted to evict
|
||||
// them. The scheduler will not let new pods reserve the claim while
|
||||
// it has these tainted devices. Once all pods are evicted, the
|
||||
// claim will get deallocated.
|
||||
//
|
||||
// The maximum number of tolerations is 16.
|
||||
//
|
||||
// This field can only be set when deviceClassName is set and no subrequests
|
||||
// are specified in the firstAvailable list.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
Tolerations []DeviceToleration `json:"tolerations,omitempty" protobuf:"bytes,8,opt,name=tolerations"`
|
||||
}
|
||||
|
||||
// DeviceSubRequest describes a request for device provided in the
|
||||
// claim.spec.devices.requests[].firstAvailable array. Each
|
||||
// is typically a request for a single resource like a device, but can
|
||||
// also ask for several identical devices.
|
||||
//
|
||||
// DeviceSubRequest is similar to Request, but doesn't expose the AdminAccess
|
||||
// or FirstAvailable fields, as those can only be set on the top-level request.
|
||||
// AdminAccess is not supported for requests with a prioritized list, and
|
||||
// recursive FirstAvailable fields are not supported.
|
||||
type DeviceSubRequest struct {
|
||||
// Name can be used to reference this subrequest in the list of constraints
|
||||
// or the list of configurations for the claim. References must use the
|
||||
// format <main request>/<subrequest>.
|
||||
//
|
||||
// Must be a DNS label.
|
||||
//
|
||||
// +required
|
||||
Name string `json:"name" protobuf:"bytes,1,name=name"`
|
||||
|
||||
// DeviceClassName references a specific DeviceClass, which can define
|
||||
// additional configuration and selectors to be inherited by this
|
||||
// subrequest.
|
||||
//
|
||||
// A class is required. Which classes are available depends on the cluster.
|
||||
//
|
||||
// Administrators may use this to restrict which devices may get
|
||||
@ -435,7 +795,7 @@ type DeviceRequest struct {
|
||||
// Allocation will fail if some devices are already allocated,
|
||||
// unless adminAccess is requested.
|
||||
//
|
||||
// If AlloctionMode is not specified, the default mode is ExactCount. If
|
||||
// If AllocationMode is not specified, the default mode is ExactCount. If
|
||||
// the mode is ExactCount and count is not specified, the default count is
|
||||
// one. Any other requests must specify this field.
|
||||
//
|
||||
@ -452,23 +812,34 @@ type DeviceRequest struct {
|
||||
// +oneOf=AllocationMode
|
||||
Count int64 `json:"count,omitempty" protobuf:"bytes,5,opt,name=count"`
|
||||
|
||||
// AdminAccess indicates that this is a claim for administrative access
|
||||
// to the device(s). Claims with AdminAccess are expected to be used for
|
||||
// monitoring or other management services for a device. They ignore
|
||||
// all ordinary claims to the device with respect to access modes and
|
||||
// any resource allocations.
|
||||
// If specified, the request's tolerations.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRAAdminAccess
|
||||
// feature gate. Admin access is disabled if this field is unset or
|
||||
// set to false, otherwise it is enabled.
|
||||
// Tolerations for NoSchedule are required to allocate a
|
||||
// device which has a taint with that effect. The same applies
|
||||
// to NoExecute.
|
||||
//
|
||||
// In addition, should any of the allocated devices get tainted
|
||||
// with NoExecute after allocation and that effect is not tolerated,
|
||||
// then all pods consuming the ResourceClaim get deleted to evict
|
||||
// them. The scheduler will not let new pods reserve the claim while
|
||||
// it has these tainted devices. Once all pods are evicted, the
|
||||
// claim will get deallocated.
|
||||
//
|
||||
// The maximum number of tolerations is 16.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +featureGate=DRAAdminAccess
|
||||
AdminAccess *bool `json:"adminAccess,omitempty" protobuf:"bytes,6,opt,name=adminAccess"`
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
Tolerations []DeviceToleration `json:"tolerations,omitempty" protobuf:"bytes,7,opt,name=tolerations"`
|
||||
}
|
||||
|
||||
const (
|
||||
DeviceSelectorsMaxSize = 32
|
||||
DeviceSelectorsMaxSize = 32
|
||||
FirstAvailableDeviceRequestMaxSize = 8
|
||||
DeviceTolerationsMaxLength = 16
|
||||
)
|
||||
|
||||
type DeviceAllocationMode string
|
||||
@ -581,6 +952,10 @@ type DeviceConstraint struct {
|
||||
// constraint. If this is not specified, this constraint applies to all
|
||||
// requests in this claim.
|
||||
//
|
||||
// References to subrequests must include the name of the main request
|
||||
// and may include the subrequest using the format <main request>[/<subrequest>]. If just
|
||||
// the main request is given, the constraint applies to all subrequests.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"`
|
||||
@ -618,6 +993,10 @@ type DeviceClaimConfiguration struct {
|
||||
// Requests lists the names of requests where the configuration applies.
|
||||
// If empty, it applies to all requests.
|
||||
//
|
||||
// References to subrequests must include the name of the main request
|
||||
// and may include the subrequest using the format <main request>[/<subrequest>]. If just
|
||||
// the main request is given, the configuration applies to all subrequests.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"`
|
||||
@ -666,6 +1045,59 @@ type OpaqueDeviceConfiguration struct {
|
||||
// [OpaqueDeviceConfiguration.Parameters] field.
|
||||
const OpaqueParametersMaxLength = 10 * 1024
|
||||
|
||||
// The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches
|
||||
// the triple <key,value,effect> using the matching operator <operator>.
|
||||
type DeviceToleration struct {
|
||||
// Key is the taint key that the toleration applies to. Empty means match all taint keys.
|
||||
// If the key is empty, operator must be Exists; this combination means to match all values and all keys.
|
||||
// Must be a label name.
|
||||
//
|
||||
// +optional
|
||||
Key string `json:"key,omitempty" protobuf:"bytes,1,opt,name=key"`
|
||||
|
||||
// Operator represents a key's relationship to the value.
|
||||
// Valid operators are Exists and Equal. Defaults to Equal.
|
||||
// Exists is equivalent to wildcard for value, so that a ResourceClaim can
|
||||
// tolerate all taints of a particular category.
|
||||
//
|
||||
// +optional
|
||||
// +default="Equal"
|
||||
Operator DeviceTolerationOperator `json:"operator,omitempty" protobuf:"bytes,2,opt,name=operator,casttype=DeviceTolerationOperator"`
|
||||
|
||||
// Value is the taint value the toleration matches to.
|
||||
// If the operator is Exists, the value must be empty, otherwise just a regular string.
|
||||
// Must be a label value.
|
||||
//
|
||||
// +optional
|
||||
Value string `json:"value,omitempty" protobuf:"bytes,3,opt,name=value"`
|
||||
|
||||
// Effect indicates the taint effect to match. Empty means match all taint effects.
|
||||
// When specified, allowed values are NoSchedule and NoExecute.
|
||||
//
|
||||
// +optional
|
||||
Effect DeviceTaintEffect `json:"effect,omitempty" protobuf:"bytes,4,opt,name=effect,casttype=DeviceTaintEffect"`
|
||||
|
||||
// TolerationSeconds represents the period of time the toleration (which must be
|
||||
// of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
|
||||
// it is not set, which means tolerate the taint forever (do not evict). Zero and
|
||||
// negative values will be treated as 0 (evict immediately) by the system.
|
||||
// If larger than zero, the time when the pod needs to be evicted is calculated as <time when
|
||||
// taint was adedd> + <toleration seconds>.
|
||||
//
|
||||
// +optional
|
||||
TolerationSeconds *int64 `json:"tolerationSeconds,omitempty" protobuf:"varint,5,opt,name=tolerationSeconds"`
|
||||
}
|
||||
|
||||
// A toleration operator is the set of operators that can be used in a toleration.
|
||||
//
|
||||
// +enum
|
||||
type DeviceTolerationOperator string
|
||||
|
||||
const (
|
||||
DeviceTolerationOpExists DeviceTolerationOperator = "Exists"
|
||||
DeviceTolerationOpEqual DeviceTolerationOperator = "Equal"
|
||||
)
|
||||
|
||||
// ResourceClaimStatus tracks whether the resource has been allocated and what
|
||||
// the result of that was.
|
||||
type ResourceClaimStatus struct {
|
||||
@ -790,8 +1222,12 @@ const AllocationResultsMaxSize = 32
|
||||
// DeviceRequestAllocationResult contains the allocation result for one request.
|
||||
type DeviceRequestAllocationResult struct {
|
||||
// Request is the name of the request in the claim which caused this
|
||||
// device to be allocated. Multiple devices may have been allocated
|
||||
// per request.
|
||||
// device to be allocated. If it references a subrequest in the
|
||||
// firstAvailable list on a DeviceRequest, this field must
|
||||
// include both the name of the main request and the subrequest
|
||||
// using the format <main request>/<subrequest>.
|
||||
//
|
||||
// Multiple devices may have been allocated per request.
|
||||
//
|
||||
// +required
|
||||
Request string `json:"request" protobuf:"bytes,1,name=request"`
|
||||
@ -832,6 +1268,19 @@ type DeviceRequestAllocationResult struct {
|
||||
// +optional
|
||||
// +featureGate=DRAAdminAccess
|
||||
AdminAccess *bool `json:"adminAccess" protobuf:"bytes,5,name=adminAccess"`
|
||||
|
||||
// A copy of all tolerations specified in the request at the time
|
||||
// when the device got allocated.
|
||||
//
|
||||
// The maximum number of tolerations is 16.
|
||||
//
|
||||
// This is an alpha field and requires enabling the DRADeviceTaints
|
||||
// feature gate.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
// +featureGate=DRADeviceTaints
|
||||
Tolerations []DeviceToleration `json:"tolerations,omitempty" protobuf:"bytes,6,opt,name=tolerations"`
|
||||
}
|
||||
|
||||
// DeviceAllocationConfiguration gets embedded in an AllocationResult.
|
||||
@ -846,6 +1295,10 @@ type DeviceAllocationConfiguration struct {
|
||||
// Requests lists the names of requests where the configuration applies.
|
||||
// If empty, its applies to all requests.
|
||||
//
|
||||
// References to subrequests must include the name of the main request
|
||||
// and may include the subrequest using the format <main request>[/<subrequest>]. If just
|
||||
// the main request is given, the configuration applies to all subrequests.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
Requests []string `json:"requests,omitempty" protobuf:"bytes,2,opt,name=requests"`
|
||||
@ -1003,6 +1456,24 @@ type ResourceClaimTemplateList struct {
|
||||
Items []ResourceClaimTemplate `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
const (
|
||||
// AllocatedDeviceStatusMaxConditions represents the maximum number of
|
||||
// conditions in a device status.
|
||||
AllocatedDeviceStatusMaxConditions int = 8
|
||||
// AllocatedDeviceStatusDataMaxLength represents the maximum length of the
|
||||
// raw data in the Data field in a device status.
|
||||
AllocatedDeviceStatusDataMaxLength int = 10 * 1024
|
||||
// NetworkDeviceDataMaxIPs represents the maximum number of IPs in the networkData
|
||||
// field in a device status.
|
||||
NetworkDeviceDataMaxIPs int = 16
|
||||
// NetworkDeviceDataInterfaceNameMaxLength represents the maximum number of characters
|
||||
// for the networkData.interfaceName field in a device status.
|
||||
NetworkDeviceDataInterfaceNameMaxLength int = 256
|
||||
// NetworkDeviceDataHardwareAddressMaxLength represents the maximum number of characters
|
||||
// for the networkData.hardwareAddress field in a device status.
|
||||
NetworkDeviceDataHardwareAddressMaxLength int = 128
|
||||
)
|
||||
|
||||
// AllocatedDeviceStatus contains the status of an allocated device, if the
|
||||
// driver chooses to report it. This may include driver-specific information.
|
||||
type AllocatedDeviceStatus struct {
|
||||
@ -1035,6 +1506,8 @@ type AllocatedDeviceStatus struct {
|
||||
// If the device has been configured according to the class and claim
|
||||
// config references, the `Ready` condition should be True.
|
||||
//
|
||||
// Must not contain more than 8 entries.
|
||||
//
|
||||
// +optional
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
@ -1045,7 +1518,7 @@ type AllocatedDeviceStatus struct {
|
||||
// The length of the raw data must be smaller or equal to 10 Ki.
|
||||
//
|
||||
// +optional
|
||||
Data runtime.RawExtension `json:"data,omitempty" protobuf:"bytes,5,opt,name=data"`
|
||||
Data *runtime.RawExtension `json:"data,omitempty" protobuf:"bytes,5,opt,name=data"`
|
||||
|
||||
// NetworkData contains network-related information specific to the device.
|
||||
//
|
||||
@ -1072,6 +1545,8 @@ type NetworkDeviceData struct {
|
||||
// associated subnet mask.
|
||||
// e.g.: "192.0.2.5/24" for IPv4 and "2001:db8::5/64" for IPv6.
|
||||
//
|
||||
// Must not contain more than 16 entries.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
IPs []string `json:"ips,omitempty" protobuf:"bytes,2,opt,name=ips"`
|
||||
@ -1083,3 +1558,107 @@ type NetworkDeviceData struct {
|
||||
// +optional
|
||||
HardwareAddress string `json:"hardwareAddress,omitempty" protobuf:"bytes,3,opt,name=hardwareAddress"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.33
|
||||
|
||||
// DeviceTaintRule adds one taint to all devices which match the selector.
|
||||
// This has the same effect as if the taint was specified directly
|
||||
// in the ResourceSlice by the DRA driver.
|
||||
type DeviceTaintRule struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec specifies the selector and one taint.
|
||||
//
|
||||
// Changing the spec automatically increments the metadata.generation number.
|
||||
Spec DeviceTaintRuleSpec `json:"spec" protobuf:"bytes,2,name=spec"`
|
||||
|
||||
// ^^^
|
||||
// A spec gets added because adding a status seems likely.
|
||||
// Such a status could provide feedback on applying the
|
||||
// eviction and/or statistics (number of matching devices,
|
||||
// affected allocated claims, pods remaining to be evicted,
|
||||
// etc.).
|
||||
}
|
||||
|
||||
// DeviceTaintRuleSpec specifies the selector and one taint.
|
||||
type DeviceTaintRuleSpec struct {
|
||||
// DeviceSelector defines which device(s) the taint is applied to.
|
||||
// All selector criteria must be satified for a device to
|
||||
// match. The empty selector matches all devices. Without
|
||||
// a selector, no devices are matches.
|
||||
//
|
||||
// +optional
|
||||
DeviceSelector *DeviceTaintSelector `json:"deviceSelector,omitempty" protobuf:"bytes,1,opt,name=deviceSelector"`
|
||||
|
||||
// The taint that gets applied to matching devices.
|
||||
//
|
||||
// +required
|
||||
Taint DeviceTaint `json:"taint,omitempty" protobuf:"bytes,2,rep,name=taint"`
|
||||
}
|
||||
|
||||
// DeviceTaintSelector defines which device(s) a DeviceTaintRule applies to.
|
||||
// The empty selector matches all devices. Without a selector, no devices
|
||||
// are matched.
|
||||
type DeviceTaintSelector struct {
|
||||
// If DeviceClassName is set, the selectors defined there must be
|
||||
// satisfied by a device to be selected. This field corresponds
|
||||
// to class.metadata.name.
|
||||
//
|
||||
// +optional
|
||||
DeviceClassName *string `json:"deviceClassName,omitempty" protobuf:"bytes,1,opt,name=deviceClassName"`
|
||||
|
||||
// If driver is set, only devices from that driver are selected.
|
||||
// This fields corresponds to slice.spec.driver.
|
||||
//
|
||||
// +optional
|
||||
Driver *string `json:"driver,omitempty" protobuf:"bytes,2,opt,name=driver"`
|
||||
|
||||
// If pool is set, only devices in that pool are selected.
|
||||
//
|
||||
// Also setting the driver name may be useful to avoid
|
||||
// ambiguity when different drivers use the same pool name,
|
||||
// but this is not required because selecting pools from
|
||||
// different drivers may also be useful, for example when
|
||||
// drivers with node-local devices use the node name as
|
||||
// their pool name.
|
||||
//
|
||||
// +optional
|
||||
Pool *string `json:"pool,omitempty" protobuf:"bytes,3,opt,name=pool"`
|
||||
|
||||
// If device is set, only devices with that name are selected.
|
||||
// This field corresponds to slice.spec.devices[].name.
|
||||
//
|
||||
// Setting also driver and pool may be required to avoid ambiguity,
|
||||
// but is not required.
|
||||
//
|
||||
// +optional
|
||||
Device *string `json:"device,omitempty" protobuf:"bytes,4,opt,name=device"`
|
||||
|
||||
// Selectors contains the same selection criteria as a ResourceClaim.
|
||||
// Currently, CEL expressions are supported. All of these selectors
|
||||
// must be satisfied.
|
||||
//
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,5,rep,name=selectors"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.33
|
||||
|
||||
// DeviceTaintRuleList is a collection of DeviceTaintRules.
|
||||
type DeviceTaintRuleList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard list metadata
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is the list of DeviceTaintRules.
|
||||
Items []DeviceTaintRule `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
165
vendor/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go
generated
vendored
165
vendor/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go
generated
vendored
@ -32,7 +32,7 @@ var map_AllocatedDeviceStatus = map[string]string{
|
||||
"driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
|
||||
"pool": "This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.",
|
||||
"device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.",
|
||||
"conditions": "Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.",
|
||||
"conditions": "Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.\n\nMust not contain more than 8 entries.",
|
||||
"data": "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki.",
|
||||
"networkData": "NetworkData contains network-related information specific to the device.",
|
||||
}
|
||||
@ -52,9 +52,14 @@ func (AllocationResult) SwaggerDoc() map[string]string {
|
||||
}
|
||||
|
||||
var map_BasicDevice = map[string]string{
|
||||
"": "BasicDevice defines one device instance.",
|
||||
"attributes": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
|
||||
"capacity": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
|
||||
"": "BasicDevice defines one device instance.",
|
||||
"attributes": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
|
||||
"capacity": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
|
||||
"consumesCounters": "ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets.\n\nThere can only be a single entry per counterSet.\n\nThe total number of device counter consumption entries must be <= 32. In addition, the total number in the entire ResourceSlice must be <= 1024 (for example, 64 devices with 16 counters each).",
|
||||
"nodeName": "NodeName identifies the node where the device is available.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.",
|
||||
"nodeSelector": "NodeSelector defines the nodes where the device is available.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.",
|
||||
"allNodes": "AllNodes indicates that all nodes have access to the device.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set.",
|
||||
"taints": "If specified, these are the driver-defined taints.\n\nThe maximum number of taints is 4.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
}
|
||||
|
||||
func (BasicDevice) SwaggerDoc() map[string]string {
|
||||
@ -70,6 +75,25 @@ func (CELDeviceSelector) SwaggerDoc() map[string]string {
|
||||
return map_CELDeviceSelector
|
||||
}
|
||||
|
||||
var map_Counter = map[string]string{
|
||||
"": "Counter describes a quantity associated with a device.",
|
||||
"value": "Value defines how much of a certain device counter is available.",
|
||||
}
|
||||
|
||||
func (Counter) SwaggerDoc() map[string]string {
|
||||
return map_Counter
|
||||
}
|
||||
|
||||
var map_CounterSet = map[string]string{
|
||||
"": "CounterSet defines a named set of counters that are available to be used by devices defined in the ResourceSlice.\n\nThe counters are not allocatable by themselves, but can be referenced by devices. When a device is allocated, the portion of counters it uses will no longer be available for use by other devices.",
|
||||
"name": "CounterSet is the name of the set from which the counters defined will be consumed.",
|
||||
"counters": "Counters defines the counters that will be consumed by the device. The name of each counter must be unique in that set and must be a DNS label.\n\nTo ensure this uniqueness, capacities defined by the vendor must be listed without the driver name as domain prefix in their name. All others must be listed with their domain prefix.\n\nThe maximum number of counters is 32.",
|
||||
}
|
||||
|
||||
func (CounterSet) SwaggerDoc() map[string]string {
|
||||
return map_CounterSet
|
||||
}
|
||||
|
||||
var map_Device = map[string]string{
|
||||
"": "Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.",
|
||||
"name": "Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.",
|
||||
@ -83,7 +107,7 @@ func (Device) SwaggerDoc() map[string]string {
|
||||
var map_DeviceAllocationConfiguration = map[string]string{
|
||||
"": "DeviceAllocationConfiguration gets embedded in an AllocationResult.",
|
||||
"source": "Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.",
|
||||
"requests": "Requests lists the names of requests where the configuration applies. If empty, its applies to all requests.",
|
||||
"requests": "Requests lists the names of requests where the configuration applies. If empty, its applies to all requests.\n\nReferences to subrequests must include the name of the main request and may include the subrequest using the format <main request>[/<subrequest>]. If just the main request is given, the configuration applies to all subrequests.",
|
||||
}
|
||||
|
||||
func (DeviceAllocationConfiguration) SwaggerDoc() map[string]string {
|
||||
@ -125,7 +149,7 @@ func (DeviceClaim) SwaggerDoc() map[string]string {
|
||||
|
||||
var map_DeviceClaimConfiguration = map[string]string{
|
||||
"": "DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.",
|
||||
"requests": "Requests lists the names of requests where the configuration applies. If empty, it applies to all requests.",
|
||||
"requests": "Requests lists the names of requests where the configuration applies. If empty, it applies to all requests.\n\nReferences to subrequests must include the name of the main request and may include the subrequest using the format <main request>[/<subrequest>]. If just the main request is given, the configuration applies to all subrequests.",
|
||||
}
|
||||
|
||||
func (DeviceClaimConfiguration) SwaggerDoc() map[string]string {
|
||||
@ -181,7 +205,7 @@ func (DeviceConfiguration) SwaggerDoc() map[string]string {
|
||||
|
||||
var map_DeviceConstraint = map[string]string{
|
||||
"": "DeviceConstraint must have exactly one field set besides Requests.",
|
||||
"requests": "Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.",
|
||||
"requests": "Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.\n\nReferences to subrequests must include the name of the main request and may include the subrequest using the format <main request>[/<subrequest>]. If just the main request is given, the constraint applies to all subrequests.",
|
||||
"matchAttribute": "MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.\n\nFor example, if you specified \"dra.example.com/numa\" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen.\n\nMust include the domain qualifier.",
|
||||
}
|
||||
|
||||
@ -189,14 +213,26 @@ func (DeviceConstraint) SwaggerDoc() map[string]string {
|
||||
return map_DeviceConstraint
|
||||
}
|
||||
|
||||
var map_DeviceCounterConsumption = map[string]string{
|
||||
"": "DeviceCounterConsumption defines a set of counters that a device will consume from a CounterSet.",
|
||||
"counterSet": "CounterSet defines the set from which the counters defined will be consumed.",
|
||||
"counters": "Counters defines the Counter that will be consumed by the device.\n\nThe maximum number counters in a device is 32. In addition, the maximum number of all counters in all devices is 1024 (for example, 64 devices with 16 counters each).",
|
||||
}
|
||||
|
||||
func (DeviceCounterConsumption) SwaggerDoc() map[string]string {
|
||||
return map_DeviceCounterConsumption
|
||||
}
|
||||
|
||||
var map_DeviceRequest = map[string]string{
|
||||
"": "DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices.\n\nA DeviceClassName is currently required. Clients must check that it is indeed set. It's absence indicates that something changed in a way that is not supported by the client yet, in which case it must refuse to handle the request.",
|
||||
"": "DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices.",
|
||||
"name": "Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.\n\nMust be a DNS label.",
|
||||
"deviceClassName": "DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.\n\nA class is required. Which classes are available depends on the cluster.\n\nAdministrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.",
|
||||
"selectors": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.",
|
||||
"allocationMode": "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AlloctionMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.",
|
||||
"count": "Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.",
|
||||
"adminAccess": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.",
|
||||
"deviceClassName": "DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.\n\nA class is required if no subrequests are specified in the firstAvailable list and no class can be set if subrequests are specified in the firstAvailable list. Which classes are available depends on the cluster.\n\nAdministrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.",
|
||||
"selectors": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.",
|
||||
"allocationMode": "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n At least one device must exist on the node for the allocation to succeed.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.",
|
||||
"count": "Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.",
|
||||
"adminAccess": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.",
|
||||
"firstAvailable": "FirstAvailable contains subrequests, of which exactly one will be satisfied by the scheduler to satisfy this request. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one cannot be used.\n\nThis field may only be set in the entries of DeviceClaim.Requests.\n\nDRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later.",
|
||||
"tolerations": "If specified, the request's tolerations.\n\nTolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.\n\nIn addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.\n\nThe maximum number of tolerations is 16.\n\nThis field can only be set when deviceClassName is set and no subrequests are specified in the firstAvailable list.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
}
|
||||
|
||||
func (DeviceRequest) SwaggerDoc() map[string]string {
|
||||
@ -205,11 +241,12 @@ func (DeviceRequest) SwaggerDoc() map[string]string {
|
||||
|
||||
var map_DeviceRequestAllocationResult = map[string]string{
|
||||
"": "DeviceRequestAllocationResult contains the allocation result for one request.",
|
||||
"request": "Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request.",
|
||||
"request": "Request is the name of the request in the claim which caused this device to be allocated. If it references a subrequest in the firstAvailable list on a DeviceRequest, this field must include both the name of the main request and the subrequest using the format <main request>/<subrequest>.\n\nMultiple devices may have been allocated per request.",
|
||||
"driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
|
||||
"pool": "This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.",
|
||||
"device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.",
|
||||
"adminAccess": "AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.",
|
||||
"tolerations": "A copy of all tolerations specified in the request at the time when the device got allocated.\n\nThe maximum number of tolerations is 16.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
}
|
||||
|
||||
func (DeviceRequestAllocationResult) SwaggerDoc() map[string]string {
|
||||
@ -225,10 +262,92 @@ func (DeviceSelector) SwaggerDoc() map[string]string {
|
||||
return map_DeviceSelector
|
||||
}
|
||||
|
||||
var map_DeviceSubRequest = map[string]string{
|
||||
"": "DeviceSubRequest describes a request for device provided in the claim.spec.devices.requests[].firstAvailable array. Each is typically a request for a single resource like a device, but can also ask for several identical devices.\n\nDeviceSubRequest is similar to Request, but doesn't expose the AdminAccess or FirstAvailable fields, as those can only be set on the top-level request. AdminAccess is not supported for requests with a prioritized list, and recursive FirstAvailable fields are not supported.",
|
||||
"name": "Name can be used to reference this subrequest in the list of constraints or the list of configurations for the claim. References must use the format <main request>/<subrequest>.\n\nMust be a DNS label.",
|
||||
"deviceClassName": "DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this subrequest.\n\nA class is required. Which classes are available depends on the cluster.\n\nAdministrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.",
|
||||
"selectors": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.",
|
||||
"allocationMode": "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.",
|
||||
"count": "Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.",
|
||||
"tolerations": "If specified, the request's tolerations.\n\nTolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute.\n\nIn addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated.\n\nThe maximum number of tolerations is 16.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
|
||||
}
|
||||
|
||||
func (DeviceSubRequest) SwaggerDoc() map[string]string {
|
||||
return map_DeviceSubRequest
|
||||
}
|
||||
|
||||
var map_DeviceTaint = map[string]string{
|
||||
"": "The device this taint is attached to has the \"effect\" on any claim which does not tolerate the taint and, through the claim, to pods using the claim.",
|
||||
"key": "The taint key to be applied to a device. Must be a label name.",
|
||||
"value": "The taint value corresponding to the taint key. Must be a label value.",
|
||||
"effect": "The effect of the taint on claims that do not tolerate the taint and through such claims on the pods using them. Valid effects are NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here.",
|
||||
"timeAdded": "TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set.",
|
||||
}
|
||||
|
||||
func (DeviceTaint) SwaggerDoc() map[string]string {
|
||||
return map_DeviceTaint
|
||||
}
|
||||
|
||||
var map_DeviceTaintRule = map[string]string{
|
||||
"": "DeviceTaintRule adds one taint to all devices which match the selector. This has the same effect as if the taint was specified directly in the ResourceSlice by the DRA driver.",
|
||||
"metadata": "Standard object metadata",
|
||||
"spec": "Spec specifies the selector and one taint.\n\nChanging the spec automatically increments the metadata.generation number.",
|
||||
}
|
||||
|
||||
func (DeviceTaintRule) SwaggerDoc() map[string]string {
|
||||
return map_DeviceTaintRule
|
||||
}
|
||||
|
||||
var map_DeviceTaintRuleList = map[string]string{
|
||||
"": "DeviceTaintRuleList is a collection of DeviceTaintRules.",
|
||||
"metadata": "Standard list metadata",
|
||||
"items": "Items is the list of DeviceTaintRules.",
|
||||
}
|
||||
|
||||
func (DeviceTaintRuleList) SwaggerDoc() map[string]string {
|
||||
return map_DeviceTaintRuleList
|
||||
}
|
||||
|
||||
var map_DeviceTaintRuleSpec = map[string]string{
|
||||
"": "DeviceTaintRuleSpec specifies the selector and one taint.",
|
||||
"deviceSelector": "DeviceSelector defines which device(s) the taint is applied to. All selector criteria must be satified for a device to match. The empty selector matches all devices. Without a selector, no devices are matches.",
|
||||
"taint": "The taint that gets applied to matching devices.",
|
||||
}
|
||||
|
||||
func (DeviceTaintRuleSpec) SwaggerDoc() map[string]string {
|
||||
return map_DeviceTaintRuleSpec
|
||||
}
|
||||
|
||||
var map_DeviceTaintSelector = map[string]string{
|
||||
"": "DeviceTaintSelector defines which device(s) a DeviceTaintRule applies to. The empty selector matches all devices. Without a selector, no devices are matched.",
|
||||
"deviceClassName": "If DeviceClassName is set, the selectors defined there must be satisfied by a device to be selected. This field corresponds to class.metadata.name.",
|
||||
"driver": "If driver is set, only devices from that driver are selected. This fields corresponds to slice.spec.driver.",
|
||||
"pool": "If pool is set, only devices in that pool are selected.\n\nAlso setting the driver name may be useful to avoid ambiguity when different drivers use the same pool name, but this is not required because selecting pools from different drivers may also be useful, for example when drivers with node-local devices use the node name as their pool name.",
|
||||
"device": "If device is set, only devices with that name are selected. This field corresponds to slice.spec.devices[].name.\n\nSetting also driver and pool may be required to avoid ambiguity, but is not required.",
|
||||
"selectors": "Selectors contains the same selection criteria as a ResourceClaim. Currently, CEL expressions are supported. All of these selectors must be satisfied.",
|
||||
}
|
||||
|
||||
func (DeviceTaintSelector) SwaggerDoc() map[string]string {
|
||||
return map_DeviceTaintSelector
|
||||
}
|
||||
|
||||
var map_DeviceToleration = map[string]string{
|
||||
"": "The ResourceClaim this DeviceToleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.",
|
||||
"key": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name.",
|
||||
"operator": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ResourceClaim can tolerate all taints of a particular category.",
|
||||
"value": "Value is the taint value the toleration matches to. If the operator is Exists, the value must be empty, otherwise just a regular string. Must be a label value.",
|
||||
"effect": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute.",
|
||||
"tolerationSeconds": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. If larger than zero, the time when the pod needs to be evicted is calculated as <time when taint was adedd> + <toleration seconds>.",
|
||||
}
|
||||
|
||||
func (DeviceToleration) SwaggerDoc() map[string]string {
|
||||
return map_DeviceToleration
|
||||
}
|
||||
|
||||
var map_NetworkDeviceData = map[string]string{
|
||||
"": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.",
|
||||
"interfaceName": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.",
|
||||
"ips": "IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6.",
|
||||
"ips": "IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6.\n\nMust not contain more than 16 entries.",
|
||||
"hardwareAddress": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.",
|
||||
}
|
||||
|
||||
@ -361,13 +480,15 @@ func (ResourceSliceList) SwaggerDoc() map[string]string {
|
||||
}
|
||||
|
||||
var map_ResourceSliceSpec = map[string]string{
|
||||
"": "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.",
|
||||
"driver": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.",
|
||||
"pool": "Pool describes the pool that this ResourceSlice belongs to.",
|
||||
"nodeName": "NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.\n\nThis field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.",
|
||||
"nodeSelector": "NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.\n\nMust use exactly one term.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set.",
|
||||
"allNodes": "AllNodes indicates that all nodes have access to the resources in the pool.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set.",
|
||||
"devices": "Devices lists some or all of the devices in this pool.\n\nMust not have more than 128 entries.",
|
||||
"": "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.",
|
||||
"driver": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.",
|
||||
"pool": "Pool describes the pool that this ResourceSlice belongs to.",
|
||||
"nodeName": "NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.\n\nThis field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. This field is immutable.",
|
||||
"nodeSelector": "NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.\n\nMust use exactly one term.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.",
|
||||
"allNodes": "AllNodes indicates that all nodes have access to the resources in the pool.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.",
|
||||
"devices": "Devices lists some or all of the devices in this pool.\n\nMust not have more than 128 entries.",
|
||||
"perDeviceNodeSelection": "PerDeviceNodeSelection defines whether the access from nodes to resources in the pool is set on the ResourceSlice level or on each device. If it is set to true, every device defined the ResourceSlice must specify this individually.\n\nExactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.",
|
||||
"sharedCounters": "SharedCounters defines a list of counter sets, each of which has a name and a list of counters available.\n\nThe names of the SharedCounters must be unique in the ResourceSlice.\n\nThe maximum number of SharedCounters is 32.",
|
||||
}
|
||||
|
||||
func (ResourceSliceSpec) SwaggerDoc() map[string]string {
|
||||
|
327
vendor/k8s.io/api/resource/v1alpha3/zz_generated.deepcopy.go
generated
vendored
327
vendor/k8s.io/api/resource/v1alpha3/zz_generated.deepcopy.go
generated
vendored
@ -38,7 +38,11 @@ func (in *AllocatedDeviceStatus) DeepCopyInto(out *AllocatedDeviceStatus) {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
in.Data.DeepCopyInto(&out.Data)
|
||||
if in.Data != nil {
|
||||
in, out := &in.Data, &out.Data
|
||||
*out = new(runtime.RawExtension)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.NetworkData != nil {
|
||||
in, out := &in.NetworkData, &out.NetworkData
|
||||
*out = new(NetworkDeviceData)
|
||||
@ -96,6 +100,35 @@ func (in *BasicDevice) DeepCopyInto(out *BasicDevice) {
|
||||
(*out)[key] = val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.ConsumesCounters != nil {
|
||||
in, out := &in.ConsumesCounters, &out.ConsumesCounters
|
||||
*out = make([]DeviceCounterConsumption, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.NodeName != nil {
|
||||
in, out := &in.NodeName, &out.NodeName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.NodeSelector != nil {
|
||||
in, out := &in.NodeSelector, &out.NodeSelector
|
||||
*out = new(corev1.NodeSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.AllNodes != nil {
|
||||
in, out := &in.AllNodes, &out.AllNodes
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.Taints != nil {
|
||||
in, out := &in.Taints, &out.Taints
|
||||
*out = make([]DeviceTaint, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -125,6 +158,46 @@ func (in *CELDeviceSelector) DeepCopy() *CELDeviceSelector {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Counter) DeepCopyInto(out *Counter) {
|
||||
*out = *in
|
||||
out.Value = in.Value.DeepCopy()
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Counter.
|
||||
func (in *Counter) DeepCopy() *Counter {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Counter)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CounterSet) DeepCopyInto(out *CounterSet) {
|
||||
*out = *in
|
||||
if in.Counters != nil {
|
||||
in, out := &in.Counters, &out.Counters
|
||||
*out = make(map[string]Counter, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = *val.DeepCopy()
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CounterSet.
|
||||
func (in *CounterSet) DeepCopy() *CounterSet {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CounterSet)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Device) DeepCopyInto(out *Device) {
|
||||
*out = *in
|
||||
@ -447,6 +520,29 @@ func (in *DeviceConstraint) DeepCopy() *DeviceConstraint {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceCounterConsumption) DeepCopyInto(out *DeviceCounterConsumption) {
|
||||
*out = *in
|
||||
if in.Counters != nil {
|
||||
in, out := &in.Counters, &out.Counters
|
||||
*out = make(map[string]Counter, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = *val.DeepCopy()
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceCounterConsumption.
|
||||
func (in *DeviceCounterConsumption) DeepCopy() *DeviceCounterConsumption {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceCounterConsumption)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceRequest) DeepCopyInto(out *DeviceRequest) {
|
||||
*out = *in
|
||||
@ -462,6 +558,20 @@ func (in *DeviceRequest) DeepCopyInto(out *DeviceRequest) {
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.FirstAvailable != nil {
|
||||
in, out := &in.FirstAvailable, &out.FirstAvailable
|
||||
*out = make([]DeviceSubRequest, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]DeviceToleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -483,6 +593,13 @@ func (in *DeviceRequestAllocationResult) DeepCopyInto(out *DeviceRequestAllocati
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]DeviceToleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -517,6 +634,202 @@ func (in *DeviceSelector) DeepCopy() *DeviceSelector {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceSubRequest) DeepCopyInto(out *DeviceSubRequest) {
|
||||
*out = *in
|
||||
if in.Selectors != nil {
|
||||
in, out := &in.Selectors, &out.Selectors
|
||||
*out = make([]DeviceSelector, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]DeviceToleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSubRequest.
|
||||
func (in *DeviceSubRequest) DeepCopy() *DeviceSubRequest {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceSubRequest)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceTaint) DeepCopyInto(out *DeviceTaint) {
|
||||
*out = *in
|
||||
if in.TimeAdded != nil {
|
||||
in, out := &in.TimeAdded, &out.TimeAdded
|
||||
*out = (*in).DeepCopy()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceTaint.
|
||||
func (in *DeviceTaint) DeepCopy() *DeviceTaint {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceTaint)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceTaintRule) DeepCopyInto(out *DeviceTaintRule) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceTaintRule.
|
||||
func (in *DeviceTaintRule) DeepCopy() *DeviceTaintRule {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceTaintRule)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *DeviceTaintRule) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceTaintRuleList) DeepCopyInto(out *DeviceTaintRuleList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]DeviceTaintRule, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceTaintRuleList.
|
||||
func (in *DeviceTaintRuleList) DeepCopy() *DeviceTaintRuleList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceTaintRuleList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *DeviceTaintRuleList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceTaintRuleSpec) DeepCopyInto(out *DeviceTaintRuleSpec) {
|
||||
*out = *in
|
||||
if in.DeviceSelector != nil {
|
||||
in, out := &in.DeviceSelector, &out.DeviceSelector
|
||||
*out = new(DeviceTaintSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
in.Taint.DeepCopyInto(&out.Taint)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceTaintRuleSpec.
|
||||
func (in *DeviceTaintRuleSpec) DeepCopy() *DeviceTaintRuleSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceTaintRuleSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceTaintSelector) DeepCopyInto(out *DeviceTaintSelector) {
|
||||
*out = *in
|
||||
if in.DeviceClassName != nil {
|
||||
in, out := &in.DeviceClassName, &out.DeviceClassName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.Driver != nil {
|
||||
in, out := &in.Driver, &out.Driver
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.Pool != nil {
|
||||
in, out := &in.Pool, &out.Pool
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.Device != nil {
|
||||
in, out := &in.Device, &out.Device
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.Selectors != nil {
|
||||
in, out := &in.Selectors, &out.Selectors
|
||||
*out = make([]DeviceSelector, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceTaintSelector.
|
||||
func (in *DeviceTaintSelector) DeepCopy() *DeviceTaintSelector {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceTaintSelector)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeviceToleration) DeepCopyInto(out *DeviceToleration) {
|
||||
*out = *in
|
||||
if in.TolerationSeconds != nil {
|
||||
in, out := &in.TolerationSeconds, &out.TolerationSeconds
|
||||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceToleration.
|
||||
func (in *DeviceToleration) DeepCopy() *DeviceToleration {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(DeviceToleration)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NetworkDeviceData) DeepCopyInto(out *NetworkDeviceData) {
|
||||
*out = *in
|
||||
@ -852,6 +1165,18 @@ func (in *ResourceSliceSpec) DeepCopyInto(out *ResourceSliceSpec) {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.PerDeviceNodeSelection != nil {
|
||||
in, out := &in.PerDeviceNodeSelection, &out.PerDeviceNodeSelection
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.SharedCounters != nil {
|
||||
in, out := &in.SharedCounters, &out.SharedCounters
|
||||
*out = make([]CounterSet, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
36
vendor/k8s.io/api/resource/v1alpha3/zz_generated.prerelease-lifecycle.go
generated
vendored
36
vendor/k8s.io/api/resource/v1alpha3/zz_generated.prerelease-lifecycle.go
generated
vendored
@ -73,6 +73,42 @@ func (in *DeviceClassList) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 37
|
||||
}
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *DeviceTaintRule) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 33
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *DeviceTaintRule) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 36
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *DeviceTaintRule) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 39
|
||||
}
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *DeviceTaintRuleList) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 33
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *DeviceTaintRuleList) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 36
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *DeviceTaintRuleList) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 39
|
||||
}
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *ResourceClaim) APILifecycleIntroduced() (major, minor int) {
|
||||
|
Reference in New Issue
Block a user