generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update demo folder with examples for opaue config parameters
Signed-off-by: Kevin Klues <[email protected]>
- Loading branch information
Showing
6 changed files
with
145 additions
and
57 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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,88 @@ | ||
# One pod, 1 container | ||
# Run as deployment with 1 replica | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: gpu-test5 | ||
|
||
--- | ||
apiVersion: resource.k8s.io/v1alpha3 | ||
kind: ResourceClaimTemplate | ||
metadata: | ||
namespace: gpu-test5 | ||
name: multiple-gpus | ||
spec: | ||
spec: | ||
devices: | ||
requests: | ||
- name: ts-gpu | ||
deviceClassName: gpu.example.com | ||
- name: sp-gpu | ||
deviceClassName: gpu.example.com | ||
config: | ||
- requests: ["ts-gpu"] | ||
opaque: | ||
driver: gpu.example.com | ||
parameters: | ||
apiVersion: gpu.resource.example.com/v1alpha1 | ||
kind: GpuConfig | ||
sharing: | ||
strategy: TimeSlicing | ||
timeSlicingConfig: | ||
duration: Long | ||
- requests: ["sp-gpu"] | ||
opaque: | ||
driver: gpu.example.com | ||
parameters: | ||
apiVersion: gpu.resource.example.com/v1alpha1 | ||
kind: GpuConfig | ||
sharing: | ||
strategy: SpacePartitioning | ||
spacePartitioningConfig: | ||
partitionCount: 10 | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
namespace: gpu-test5 | ||
name: pod0 | ||
spec: | ||
containers: | ||
- name: ts-ctr0 | ||
image: ubuntu:22.04 | ||
command: ["bash", "-c"] | ||
args: ["export; sleep 9999"] | ||
resources: | ||
claims: | ||
- name: shared-gpus | ||
request: ts-gpu | ||
- name: ts-ctr1 | ||
image: ubuntu:22.04 | ||
command: ["bash", "-c"] | ||
args: ["export; sleep 9999"] | ||
resources: | ||
claims: | ||
- name: shared-gpus | ||
request: ts-gpu | ||
- name: sp-ctr0 | ||
image: ubuntu:22.04 | ||
command: ["bash", "-c"] | ||
args: ["export; sleep 9999"] | ||
resources: | ||
claims: | ||
- name: shared-gpus | ||
request: sp-gpu | ||
- name: sp-ctr1 | ||
image: ubuntu:22.04 | ||
command: ["bash", "-c"] | ||
args: ["export; sleep 9999"] | ||
resources: | ||
claims: | ||
- name: shared-gpus | ||
request: sp-gpu | ||
resourceClaims: | ||
- name: shared-gpus | ||
resourceClaimTemplateName: multiple-gpus |