Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gpu-test6 to adhere to new DRA APIs #194

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 28 additions & 34 deletions demo/specs/quickstart/gpu-test6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,37 @@ metadata:
name: gpu-test6

---
apiVersion: gpu.resource.nvidia.com/v1alpha1
kind: GpuClaimParameters
metadata:
namespace: gpu-test6
name: a100
spec:
count: 1
selector:
andExpression:
- productName: "*a100*"
- orExpression:
- index: 0
- index: 2
- index: 4
- index: 6
- orExpression:
- migEnabled: true
- migEnabled: false
sharing:
strategy: TimeSlicing
timeSlicingConfig:
timeSlice: Long

---
apiVersion: resource.k8s.io/v1alpha2
apiVersion: resource.k8s.io/v1alpha3
kind: ResourceClaimTemplate
metadata:
namespace: gpu-test6
name: a100
spec:
spec:
resourceClassName: gpu.nvidia.com
parametersRef:
apiGroup: gpu.resource.nvidia.com
kind: GpuClaimParameters
name: a100
devices:
requests:
- name: gpu
deviceClassName: gpu.nvidia.com
selectors:
- cel:
expression: |
device.attributes['gpu.nvidia.com'].productName.lowerAscii().matches('^.*a100.*$')
&&
(device.attributes['gpu.nvidia.com'].index == 0 ||
device.attributes['gpu.nvidia.com'].index == 2 ||
device.attributes['gpu.nvidia.com'].index == 4 ||
device.attributes['gpu.nvidia.com'].index == 6)
config:
- requests: ["gpu"]
opaque:
driver: gpu.nvidia.com
parameters:
apiVersion: gpu.nvidia.com/v1alpha1
kind: GpuConfig
sharing:
strategy: TimeSlicing
timeSlicingConfig:
interval: Long

---
apiVersion: apps/v1
Expand All @@ -64,10 +59,6 @@ spec:
labels:
app: pod
spec:
resourceClaims:
- name: a100
source:
resourceClaimTemplateName: a100
containers:
- name: ctr
image: ubuntu:22.04
Expand All @@ -76,3 +67,6 @@ spec:
resources:
claims:
- name: a100
resourceClaims:
- name: a100
resourceClaimTemplateName: a100