These helper packages implement the parts of a dynamic resource allocation
driver that are generic and can be used by the in-tree test driver as well as
out-of-tree vendor drivers.
Functional options make it possible to treat some parameters as
optional (logger) and extend the API later on.
Dependencies need to be updated to use
github.com/container-orchestrated-devices/container-device-interface.
It's not decided yet whether we will implement Topology support
for DRA or not. Not having any toppology-related code
will help to avoid wrong impression that DRA is used as a hint
provider for the Topology Manager.
Add volumePath parameter to all disruptive checks, so subpath tests can use
"/test-volume" and disruptive tests can use "/mnt/volume1" for their
respective Pods.
due to redesign where we changed from new endpoint to /apis. The expected error was not also changed.
Caught by e2e tests when feature enabled. Should have been caught by unit test first but it was implemented without root /apis. Unit test also fixed
The controller uses the exact same logic as the generic ephemeral inline volume
controller, just for inline ResourceClaimTemplate -> ResourceClaim.
In addition, it supports removal of pods from the ReservedFor field when those
pods are known to not need the claim anymore. At the moment, only this special
case is supported. Removal of arbitrary objects would imply granting full read
access to all types to determine whether a) an object is gone and b) if the
current incarnation is the one which is listed in ReservedFor. This may get
added later.
This is similar to the support code for generic ephemeral inline volumes.
Differences:
- to avoid stuttering, the functions are just resourceclaim.Name and
resourceclaim.IsForPod
- resourceclaim.Name returns the right name for both cases (template
and reference), which will simplify some code
Other helper functions check some simple status conditions.
This will be used for different individual packages. A separate repo
is better than reusing something like component-helpers because dependencies
will be different.
This is in response to review feedback. Checking for valid node names and the
set property catches programming mistakes in the components that have write
permission.
This adds a new resource.k8s.io API group with v1alpha1 as version. It contains
four new types: resource.ResourceClaim, resource.ResourceClass, resource.ResourceClaimTemplate, and
resource.PodScheduling.