Skip to content

Commit 8871d9d

Browse files
committed
address pr comments
1 parent 12cc376 commit 8871d9d

File tree

6 files changed

+134
-168
lines changed

6 files changed

+134
-168
lines changed

site/content/en/docs/tasks/_index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ As a batch user, you can learn how to:
4444
- [Run a Kueue managed plain Pod](run/plain_pods).
4545
- [Run a Kueue managed JobSet](run/jobsets).
4646
- [Submit jobs to MultiKueue](run/multikueue).
47-
- [Run an argo workflow](run/argo_workload)
47+
- [Use pod integration to support external workloads](run/pod-based-workloads)
48+
Kueue allows one to use the pod integration with external workloads that are not part of Kueue.
4849

4950
### Serving user
5051

site/content/en/docs/tasks/run/argo_workload.md

-167
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: "Pod Based Workloads"
3+
linkTitle: "Pod-based-workloads"
4+
weight: 8
5+
date: 2025-01-17
6+
description: >
7+
Using Pod Integration to support external integrations
8+
---
9+
10+
This page explains how to use pod integration to support external workloads.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: "Run An Argo Workflow"
3+
date: 2024-01-03
4+
weight: 7
5+
description: >
6+
Integrate Kueue with Argo Workflows.
7+
---
8+
9+
This page shows how to leverage Kueue's scheduling and resource management capabilities when running [Argo Workflows](https://argo-workflows.readthedocs.io/en/latest/).
10+
11+
This guide is for [batch users](/docs/tasks#batch-user) that have a basic understanding of Kueue. For more information, see [Kueue's overview](/docs/overview).
12+
13+
As of the writing of this doc, Kueue doesn't support Argo Workflows [Workflow](https://argo-workflows.readthedocs.io/en/latest/workflow-concepts/) resources directly,
14+
but you can take advantage of the ability for Kueue to [manage plain pods](/docs/tasks/run_plain_pods) to integrate them.
15+
16+
## Before you begin
17+
18+
1. Learn how to [install Kueue with a custom manager configuration](/docs/installation/#install-a-custom-configured-released-version).
19+
20+
2. Follow steps in [Run Plain Pods](/docs/tasks/run/plain_pods/#before-you-begin)
21+
to learn how to enable and configure the `v1/pod` integration.
22+
23+
3. Install [Argo Workflows](https://argo-workflows.readthedocs.io/en/latest/installation/#installation)
24+
25+
## Workflow definition
26+
27+
### a. Targeting a single LocalQueue
28+
29+
If you want the entire workflow to target a single [local queue](/docs/concepts/local_queue),
30+
it should be specified in the `spec.podMetadata` section of the Workflow configuration.
31+
32+
{{< include "examples/pod-based-workloads/workflow-single-queue.yaml" "yaml" >}}
33+
34+
### b. Targeting a different LocalQueue per template
35+
36+
If prefer to target a different [local queue](/docs/concepts/local_queue) for each step of your Workflow,
37+
you can define the queue in the `spec.templates[].metadata` section of the Workflow configuration.
38+
39+
In this example `hello1` and `hello2a` will target `user-queue` and `hello2b` will
40+
target `user-queue-2`.
41+
42+
{{< include "examples/pod-based-workloads/workflow-queue-per-template.yaml" "yaml" >}}
43+
44+
### c. Limitations
45+
46+
- Kueue will only manage pods created by Argo Workflows. It does not manage the Argo Workflows resources in any way.
47+
- Each pod in a Workflow will create a new Workload resource and must wait for admission by Kueue.
48+
- There is no way to ensure that a Workflow will complete before it is started. If one step of a multi-step Workflow does not have
49+
available quota, Argo Workflows will run all previous steps and then wait for quota to become available.
50+
- Kueue does not understand Argo Workflows `suspend` flag and will not manage it.
51+
- Kueue does not manage `suspend`, `http`, or `resource` template types since they do not create pods.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Workflow
3+
metadata:
4+
generateName: steps-
5+
spec:
6+
entrypoint: hello-hello-hello
7+
8+
templates:
9+
- name: hello-hello-hello
10+
steps:
11+
- - name: hello1 # hello1 is run before the following steps
12+
template: whalesay
13+
arguments:
14+
parameters:
15+
- name: message
16+
value: "hello1"
17+
- - name: hello2a # double dash => run after previous step
18+
template: whalesay
19+
arguments:
20+
parameters:
21+
- name: message
22+
value: "hello2a"
23+
- name: hello2b # single dash => run in parallel with previous step
24+
template: whalesay-queue-2
25+
arguments:
26+
parameters:
27+
- name: message
28+
value: "hello2b"
29+
30+
- name: whalesay
31+
metadata:
32+
labels:
33+
kueue.x-k8s.io/queue-name: user-queue # Pods from this template will target user-queue
34+
inputs:
35+
parameters:
36+
- name: message
37+
container:
38+
image: docker/whalesay
39+
command: [cowsay]
40+
args: ["{{inputs.parameters.message}}"]
41+
42+
- name: whalesay-queue-2
43+
metadata:
44+
labels:
45+
kueue.x-k8s.io/queue-name: user-queue-2 # Pods from this template will target user-queue-2
46+
inputs:
47+
parameters:
48+
- name: message
49+
container:
50+
image: docker/whalesay
51+
command: [cowsay]
52+
args: ["{{inputs.parameters.message}}"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Workflow
3+
metadata:
4+
generateName: hello-world-
5+
spec:
6+
entrypoint: whalesay
7+
podMetadata:
8+
labels:
9+
kueue.x-k8s.io/queue-name: user-queue # All pods will target user-queue
10+
templates:
11+
- name: whalesay
12+
container:
13+
image: docker/whalesay
14+
command: [ cowsay ]
15+
args: [ "hello world" ]
16+
resources:
17+
limits:
18+
memory: 32Mi
19+
cpu: 100m

0 commit comments

Comments
 (0)