You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes API naming to better reflect the opt-in policy-based approach
where devices are only advertised when explicitly defined in a policy.
- Rename API types and CRD
- Update controller: resourcefiltercontroller.go → resourcepolicycontroller.go
- Update RBAC, demo examples, and tests
- Update documentation with opt-in model terminology
Part of #23
Signed-off-by: Fred Rolland <frolland@nvidia.com>
-**Advanced Resource Filtering**: Fine-grained filtering of Virtual Functions based on hardware attributes
19
-
-**Custom Resource Definitions**: SriovResourceFilter CRD for configuring device filtering policies
20
-
-**Controller-based Management**: Kubernetes controller pattern for resource filter lifecycle management
18
+
-**Opt-In Device Advertisement**: Devices are only advertised when explicitly defined in a policy
19
+
-**Custom Resource Definitions**: SriovResourcePolicy CRD for configuring device advertisement policies
20
+
-**Controller-based Management**: Kubernetes controller pattern for resource policy lifecycle management
21
21
-**Multiple Resource Types**: Support for exposing different VF pools as distinct resource types
22
-
-**Node-targeted Filtering**: Per-node resource filtering with node selector support
22
+
-**Node-targeted Policies**: Per-node resource policies with node selector support
23
23
-**CDI Integration**: Uses Container Device Interface for device injection into containers
24
24
-**NRI Integration**: Node Resource Interface support for advanced container runtime interaction
25
25
-**Kubernetes Native**: Integrates seamlessly with standard Kubernetes resource request/limit model
@@ -79,7 +79,7 @@ The Helm chart supports various configuration options through `values.yaml`:
79
79
-**Image Configuration**: Customize image repository, tag, and pull policy
80
80
-**Resource Limits**: Set resource requests and limits for driver components
81
81
-**Node Selection**: Configure node selectors and tolerations
82
-
-**Namespace Configuration**: Configure the namespace where SriovResourceFilter resources are watched
82
+
-**Namespace Configuration**: Configure the namespace where SriovResourcePolicy resources are watched
83
83
-**Default Interface Prefix**: Set the default interface prefix for virtual functions
84
84
-**CDI Root**: Configure the directory for CDI file generation
85
85
-**Logging**: Adjust log verbosity and format
@@ -137,17 +137,19 @@ spec:
137
137
138
138
## Resource Filtering System
139
139
140
-
The DRA driver includes an advanced resource filtering system that allows administrators to define fine-grained policies for how SR-IOV Virtual Functions are exposed and allocated. This system uses Custom Resource Definitions (CRDs) and a Kubernetes controller to manage device filtering based on hardware characteristics.
140
+
The DRA driver uses an opt-in model where administrators explicitly define which SR-IOV Virtual Functions should be advertised as Kubernetes resources. This system uses Custom Resource Definitions (CRDs) and a Kubernetes controller to manage device advertisement policies based on hardware characteristics.
141
141
142
-
### SriovResourceFilter CRD
142
+
**Important**: Without a matching `SriovResourcePolicy`, no devices will be advertised.
143
143
144
-
The `SriovResourceFilter` custom resource allows you to define filtering policies for SR-IOV devices:
144
+
### SriovResourcePolicy CRD
145
+
146
+
The `SriovResourcePolicy` custom resource defines which SR-IOV devices should be advertised as allocatable resources:
Once a `SriovResourceFilter` is applied, pods can request specific resource types using CEL expressions:
214
+
Once a `SriovResourcePolicy` is applied, devices matching the policy are advertised and pods can request specific resource types using CEL expressions:
213
215
214
216
```yaml
215
217
apiVersion: resource.k8s.io/v1
@@ -302,11 +304,11 @@ Demonstrates requesting multiple Virtual Functions in a single resource claim:
302
304
- VfConfig applies to all allocated VFs in the claim
Copy file name to clipboardExpand all lines: demo/resource-policies/README.md
+13-10Lines changed: 13 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
-
# Resource Filtering Demo
1
+
# Resource Policy Demo
2
2
3
-
This demo showcases how to use `SriovResourceFilter` to filter and manage SR-IOV Virtual Functions based on various hardware and configuration criteria.
3
+
This demo showcases how to use `SriovResourcePolicy` to control which SR-IOV Virtual Functions are advertised as Kubernetes resources based on various hardware and configuration criteria.
4
4
5
5
## Overview
6
6
7
7
This scenario demonstrates:
8
-
- Creating resource filters based on vendor IDs, Physical Function names, and other hardware attributes
8
+
- Creating resource policies based on vendor IDs, Physical Function names, and other hardware attributes
9
9
- Setting up multiple resource configurations for different network interfaces
10
-
- Deploying a pod that uses filtered SR-IOV resources with specific network requirements
10
+
- Deploying a pod that uses policy-filtered SR-IOV resources with specific network requirements
11
11
12
12
## Components
13
13
14
-
### 1. SriovResourceFilter
15
-
The `SriovResourceFilter` resource defines how to filter available SR-IOV devices:
14
+
### 1. SriovResourcePolicy
15
+
The `SriovResourcePolicy` resource defines which SR-IOV devices should be advertised as allocatable resources:
16
16
-**nodeSelector**: Targets specific nodes (`dra-ctlplane-0.dra.lab` in this example)
Copy file name to clipboardExpand all lines: deployments/helm/dra-driver-sriov/templates/sriovnetwork.k8snetworkplumbingwg.io_sriovresourcepolicies.yaml
0 commit comments