kubelet: add support for dynamic resource allocation

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.
This commit is contained in:
Ed Bartosh
2022-07-15 14:28:18 +03:00
committed by Patrick Ohly
parent d2ff210c20
commit ae0f38437c
25 changed files with 2718 additions and 6 deletions

View File

@@ -175,6 +175,12 @@ func NodeRules() []rbacv1.PolicyRule {
// RuntimeClass
nodePolicyRules = append(nodePolicyRules, rbacv1helpers.NewRule("get", "list", "watch").Groups("node.k8s.io").Resources("runtimeclasses").RuleOrDie())
// DRA Resource Claims
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
nodePolicyRules = append(nodePolicyRules, rbacv1helpers.NewRule("get").Groups(resourceGroup).Resources("resourceclaims").RuleOrDie())
}
return nodePolicyRules
}