Skip to content

Commit fbf64e5

Browse files
authored
fix(dws): Adding a job that's compatible with GKE autopilot (#983)
* fix(dws): Adding a job that's compatible with GKE autopilot * Updating README to mention the new file
1 parent 87ce787 commit fbf64e5

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

tutorials-and-examples/workflow-orchestration/dws-examples/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ For more configuration options visit [Kueue's installation guide.](https://kueue
1919

2020
* `dws-queue.yaml` - Kueue's Cluster and Local queues with ProvisioningRequest and DWS support enabled.
2121
* `job.yaml` - Sample job that requires GPU and uses DWS-enabled queue. Contains optional annotation ` provreq.kueue.x-k8s.io/maxRunDurationSeconds` which sets `maxRunDurationSeconds` for the created ProvisioningRequest
22+
* `job-autopilot.yaml` - Sample job that requires GPU and uses DWS-enabled queue, compatible with Autopilot GKE clusters. Compared to `job.yaml`, replaces the nodepool selector with accelerator selector, which allows autopilot to manage the nodes.
2223

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
apiVersion: batch/v1
2+
kind: Job
3+
metadata:
4+
name: sample-job
5+
namespace: default
6+
labels:
7+
kueue.x-k8s.io/queue-name: dws-local-queue
8+
annotations:
9+
provreq.kueue.x-k8s.io/maxRunDurationSeconds: "600"
10+
spec:
11+
parallelism: 1
12+
completions: 1
13+
suspend: true
14+
template:
15+
spec:
16+
nodeSelector:
17+
cloud.google.com/gke-accelerator: "nvidia-tesla-t4"
18+
tolerations:
19+
- key: "nvidia.com/gpu"
20+
operator: "Exists"
21+
effect: "NoSchedule"
22+
containers:
23+
- name: dummy-job
24+
image: gcr.io/k8s-staging-perf-tests/sleep:v0.0.3
25+
args: ["120s"]
26+
resources:
27+
requests:
28+
cpu: "100m"
29+
memory: "100Mi"
30+
nvidia.com/gpu: 1
31+
limits:
32+
cpu: "100m"
33+
memory: "100Mi"
34+
nvidia.com/gpu: 1
35+
restartPolicy: Never

0 commit comments

Comments
 (0)