Skip to content

Commit 3cadb6f

Browse files
committed
DRA test: update examples
Some more out-dated reference to resource class. Keeping the pod running is better for demonstrating the lifecycle of claims because it is actually possible to see a claim in the allocated state.
1 parent 3a8af5a commit 3cadb6f

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

test/e2e/dra/test-driver/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ testing.
1515

1616
Valid parameters are key/value string pairs stored in a ConfigMap.
1717
Those get copied into the ResourceClaimStatus with "user_" and "admin_" as
18-
prefix, depending on whether they came from the ResourceClaim or ResourceClass.
18+
prefix, depending on whether they came from the ResourceClaim or DeviceClass.
1919
They get stored in the `ResourceHandle` field as JSON map by the controller.
2020
The kubelet plugin then sets these attributes as environment variables in each
2121
container that uses the resource.
@@ -71,7 +71,7 @@ KUBECONFIG=/var/run/kubernetes/admin.kubeconfig go run ./test/e2e/dra/test-drive
7171
And finally:
7272
```console
7373
$ export KUBECONFIG=/var/run/kubernetes/admin.kubeconfig
74-
$ kubectl create -f test/e2e/dra/test-driver/deploy/example/resourceclass.yaml
74+
$ kubectl create -f test/e2e/dra/test-driver/deploy/example/deviceclass.yaml
7575
resourceclass/example created
7676
$ kubectl create -f test/e2e/dra/test-driver/deploy/example/pod-inline.yaml
7777
configmap/pause-claim-parameters created

test/e2e/dra/test-driver/deploy/example/pod-external.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@ spec:
2424
containers:
2525
- name: with-resource
2626
image: registry.k8s.io/e2e-test-images/busybox:1.36.1-1
27-
command: ["sh", "-c", "set && mount && ls -la /dev/"]
27+
command: ["sh", "-c", "set && mount && ls -la /dev/ && sleep 10000"]
2828
resources:
2929
claims:
3030
- name: resource
3131
- name: without-resource
3232
image: registry.k8s.io/e2e-test-images/busybox:1.36.1-1
33-
command: ["sh", "-c", "set && mount && ls -la /dev/"]
33+
command: ["sh", "-c", "set && mount && ls -la /dev/ && sleep 10000"]
34+
terminationGracePeriodSeconds: 0 # Shut down immediately.
3435
resourceClaims:
3536
- name: resource
3637
resourceClaimName: external-claim

test/e2e/dra/test-driver/deploy/example/pod-inline.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ spec:
2929
containers:
3030
- name: with-resource
3131
image: registry.k8s.io/e2e-test-images/busybox:1.36.1-1
32-
command: ["sh", "-c", "set && mount && ls -la /dev/"]
32+
command: ["sh", "-c", "set && mount && ls -la /dev/ && sleep 10000"]
3333
resources:
3434
claims:
3535
- name: resource
3636
- name: without-resource
3737
image: registry.k8s.io/e2e-test-images/busybox:1.36.1-1
38-
command: ["sh", "-c", "set && mount && ls -la /dev/"]
38+
command: ["sh", "-c", "set && mount && ls -la /dev/ && sleep 10000"]
39+
terminationGracePeriodSeconds: 0 # Shut down immediately.
3940
resourceClaims:
4041
- name: resource
4142
resourceClaimTemplateName: test-inline-claim-template

0 commit comments

Comments
 (0)