forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added pod referencing external resource claim - used ubuntu images for pod-external and pod-inline - run commands showing device nodes, mounts and env vars - set pod restart policy to Never - renamed shared-resource-claim.yaml -> pod-shared.yaml Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
- Loading branch information
Showing
4 changed files
with
115 additions
and
57 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
test/integration/cdi/example-driver/deploy/example/pod-external.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# One external resource claim, one pod, two containers. | ||
# One container uses resource, one does not. | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: external-claim-parameters | ||
namespace: default | ||
data: | ||
a: b | ||
--- | ||
apiVersion: v1 | ||
kind: ResourceClaim | ||
metadata: | ||
name: external-claim | ||
spec: | ||
resourceClassName: example | ||
parameters: | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
name: external-claim-parameters | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: test-external-claim | ||
spec: | ||
restartPolicy: Never | ||
containers: | ||
- name: with-resource | ||
image: registry.k8s.io/e2e-test-images/busybox:1.29-2 | ||
command: ["sh", "-c", "set && mount && ls -la /dev/"] | ||
resources: | ||
claims: | ||
- resource | ||
- name: without-resource | ||
image: registry.k8s.io/e2e-test-images/busybox:1.29-2 | ||
command: ["sh", "-c", "set && mount && ls -la /dev/"] | ||
resourceClaims: | ||
- name: resource | ||
claim: | ||
resourceClaimName: external-claim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
test/integration/cdi/example-driver/deploy/example/pod-shared.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# One external resource claim, two pods, two containers in each pod. | ||
# Pods share the same resource. | ||
# One container uses resource, one does not. | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: shared-claim-parameters | ||
data: | ||
a: b | ||
--- | ||
apiVersion: v1 | ||
kind: ResourceClaim | ||
metadata: | ||
name: shared-claim | ||
spec: | ||
resourceClassName: example | ||
parameters: | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
name: shared-claim-parameters | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: test-shared-claim | ||
spec: | ||
restartPolicy: Never | ||
containers: | ||
- name: with-resource | ||
image: registry.k8s.io/e2e-test-images/busybox:1.29-2 | ||
command: ["sh", "-c", "set && mount && ls -la /dev/"] | ||
resources: | ||
claims: | ||
- resource | ||
- name: without-resource | ||
image: registry.k8s.io/e2e-test-images/busybox:1.29-2 | ||
command: ["sh", "-c", "set && mount && ls -la /dev/"] | ||
resourceClaims: | ||
- name: resource | ||
claim: | ||
resourceClaimName: shared-claim | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: test-shared-claim-2 | ||
spec: | ||
restartPolicy: Never | ||
containers: | ||
- name: with-resource | ||
image: registry.k8s.io/e2e-test-images/busybox:1.29-2 | ||
command: ["sh", "-c", "set && mount && ls -la /dev/"] | ||
resources: | ||
claims: | ||
- resource | ||
- name: without-resource | ||
image: registry.k8s.io/e2e-test-images/busybox:1.29-2 | ||
command: ["sh", "-c", "set && mount && ls -la /dev/"] | ||
resourceClaims: | ||
- name: resource | ||
claim: | ||
resourceClaimName: shared-claim |
52 changes: 0 additions & 52 deletions
52
test/integration/cdi/example-driver/deploy/example/shared-resource-claim.yaml
This file was deleted.
Oops, something went wrong.