Merge pull request #131526 from pohly/dra-test-driver-example-update

DRA test: update examples
This commit is contained in:
Kubernetes Prow Robot
2025-04-29 09:18:10 -07:00
committed by GitHub
3 changed files with 8 additions and 6 deletions

View File

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

View File

@@ -24,13 +24,14 @@ spec:
containers:
- name: with-resource
image: registry.k8s.io/e2e-test-images/busybox:1.36.1-1
command: ["sh", "-c", "set && mount && ls -la /dev/"]
command: ["sh", "-c", "set && mount && ls -la /dev/ && sleep 10000"]
resources:
claims:
- name: resource
- name: without-resource
image: registry.k8s.io/e2e-test-images/busybox:1.36.1-1
command: ["sh", "-c", "set && mount && ls -la /dev/"]
command: ["sh", "-c", "set && mount && ls -la /dev/ && sleep 10000"]
terminationGracePeriodSeconds: 0 # Shut down immediately.
resourceClaims:
- name: resource
resourceClaimName: external-claim

View File

@@ -29,13 +29,14 @@ spec:
containers:
- name: with-resource
image: registry.k8s.io/e2e-test-images/busybox:1.36.1-1
command: ["sh", "-c", "set && mount && ls -la /dev/"]
command: ["sh", "-c", "set && mount && ls -la /dev/ && sleep 10000"]
resources:
claims:
- name: resource
- name: without-resource
image: registry.k8s.io/e2e-test-images/busybox:1.36.1-1
command: ["sh", "-c", "set && mount && ls -la /dev/"]
command: ["sh", "-c", "set && mount && ls -la /dev/ && sleep 10000"]
terminationGracePeriodSeconds: 0 # Shut down immediately.
resourceClaims:
- name: resource
resourceClaimTemplateName: test-inline-claim-template