From cd85c38f51a4a8c079d95c2fd312d0dc9227908e Mon Sep 17 00:00:00 2001 From: Dmitry Shmulevich Date: Sat, 17 Aug 2024 06:23:01 -0700 Subject: [PATCH] update jobset configs Signed-off-by: Dmitry Shmulevich --- docs/examples/jobset/jobset.md | 4 ++-- docs/examples/kueue/kueue.md | 4 ++-- pkg/config/config_test.go | 2 +- .../jobset-with-driver.yaml} | 0 .../templates/{k8s/jobset.yml => jobset/jobset.yaml} | 0 .../test-jobset-with-driver.yaml} | 10 +++++----- .../{k8s/test-jobset.yml => jobset/test-jobset.yaml} | 6 +++--- .../workflows/kueue/{test-job.yml => test-job.yaml} | 6 +++--- .../{test-preemption.yml => test-preemption.yaml} | 0 tests/ci/test_jobset.sh | 2 +- tests/ci/test_kueue.sh | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) rename resources/templates/{k8s/jobset-with-driver.yml => jobset/jobset-with-driver.yaml} (100%) rename resources/templates/{k8s/jobset.yml => jobset/jobset.yaml} (100%) rename resources/workflows/{k8s/test-jobset-with-driver.yml => jobset/test-jobset-with-driver.yaml} (86%) rename resources/workflows/{k8s/test-jobset.yml => jobset/test-jobset.yaml} (94%) rename resources/workflows/kueue/{test-job.yml => test-job.yaml} (97%) rename resources/workflows/kueue/{test-preemption.yml => test-preemption.yaml} (100%) diff --git a/docs/examples/jobset/jobset.md b/docs/examples/jobset/jobset.md index 6755821..e809f36 100644 --- a/docs/examples/jobset/jobset.md +++ b/docs/examples/jobset/jobset.md @@ -15,10 +15,10 @@ kubectl apply --server-side -f https://github.com/kubernetes-sigs/jobset/release Run a jobset with workers: ```shell -./bin/knavigator -workflow ./resources/workflows/k8s/test-jobset.yml +./bin/knavigator -workflow ./resources/workflows/jobset/test-jobset.yaml ``` Run a jobset with a driver and workers: ```shell -./bin/knavigator -workflow ./resources/workflows/k8s/test-jobset-with-driver.yml +./bin/knavigator -workflow ./resources/workflows/jobset/test-jobset-with-driver.yaml ``` diff --git a/docs/examples/kueue/kueue.md b/docs/examples/kueue/kueue.md index 6942f13..5684fe9 100644 --- a/docs/examples/kueue/kueue.md +++ b/docs/examples/kueue/kueue.md @@ -11,10 +11,10 @@ kubectl apply -f charts/overrides/kueue/priority.yaml Run a kueue job: ```bash -./bin/knavigator -workflow resources/workflows/kueue/test-job.yml -cleanup +./bin/knavigator -workflow resources/workflows/kueue/test-job.yaml -cleanup ``` Run a preemption workflow with kueue: ```bash -./bin/knavigator -workflow resources/workflows/kueue/test-preemption.yml -cleanup +./bin/knavigator -workflow resources/workflows/kueue/test-preemption.yaml -cleanup ``` diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index dbaea10..b350199 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -104,7 +104,7 @@ func TestWorkflowPaths(t *testing.T) { }, { name: "Case 3: Valid input", - paths: "../../resources/workflows/volcano,../../resources/workflows/k8s/{test-job.yml,test-jobset.yml}", + paths: "../../resources/workflows/volcano,../../resources/workflows/kueue/{test-job.yaml,test-preemption.yaml}", count: 3, }, } diff --git a/resources/templates/k8s/jobset-with-driver.yml b/resources/templates/jobset/jobset-with-driver.yaml similarity index 100% rename from resources/templates/k8s/jobset-with-driver.yml rename to resources/templates/jobset/jobset-with-driver.yaml diff --git a/resources/templates/k8s/jobset.yml b/resources/templates/jobset/jobset.yaml similarity index 100% rename from resources/templates/k8s/jobset.yml rename to resources/templates/jobset/jobset.yaml diff --git a/resources/workflows/k8s/test-jobset-with-driver.yml b/resources/workflows/jobset/test-jobset-with-driver.yaml similarity index 86% rename from resources/workflows/k8s/test-jobset-with-driver.yml rename to resources/workflows/jobset/test-jobset-with-driver.yaml index 86d6a0d..0f424aa 100644 --- a/resources/workflows/k8s/test-jobset-with-driver.yml +++ b/resources/workflows/jobset/test-jobset-with-driver.yaml @@ -18,10 +18,10 @@ tasks: - id: register type: RegisterObj params: - template: "resources/templates/k8s/jobset-with-driver.yml" + template: "resources/templates/jobset/jobset-with-driver.yaml" nameFormat: "jobset{{._ENUM_}}" - podNameFormat: "{{._NAME_}}-(worker|driver)-[0-9]+-[0-9]+-.+" - podCount: "{{.replicas}}" + podNameFormat: "{{._NAME_}}-(workers|driver)-[0-9]+-[0-9]+-.+" + podCount: "{{.replicas}} * 2" - id: configure type: Configure params: @@ -47,10 +47,10 @@ tasks: cpu: 100m memory: 512M gpu: 8 - ttl: "10s" + ttl: "20s" - id: status type: CheckPod params: refTaskId: jobset status: Running - timeout: 5s + timeout: 10s diff --git a/resources/workflows/k8s/test-jobset.yml b/resources/workflows/jobset/test-jobset.yaml similarity index 94% rename from resources/workflows/k8s/test-jobset.yml rename to resources/workflows/jobset/test-jobset.yaml index fa498c7..fb98bd3 100644 --- a/resources/workflows/k8s/test-jobset.yml +++ b/resources/workflows/jobset/test-jobset.yaml @@ -18,7 +18,7 @@ tasks: - id: register type: RegisterObj params: - template: "resources/templates/k8s/jobset.yml" + template: "resources/templates/jobset/jobset.yaml" nameFormat: "jobset{{._ENUM_}}" podNameFormat: "{{._NAME_}}-workers-[0-9]+-[0-9]+-.+" podCount: "{{.replicas}}" @@ -47,10 +47,10 @@ tasks: cpu: 100m memory: 512M gpu: 8 - ttl: "10s" + ttl: "20s" - id: status type: CheckPod params: refTaskId: jobset status: Running - timeout: 5s + timeout: 10s diff --git a/resources/workflows/kueue/test-job.yml b/resources/workflows/kueue/test-job.yaml similarity index 97% rename from resources/workflows/kueue/test-job.yml rename to resources/workflows/kueue/test-job.yaml index 88b3a49..56ef878 100644 --- a/resources/workflows/kueue/test-job.yml +++ b/resources/workflows/kueue/test-job.yaml @@ -88,7 +88,7 @@ tasks: cpu: 100m memory: 512M gpu: 8 - ttl: "10s" + ttl: "20s" - id: status type: CheckObj params: @@ -96,10 +96,10 @@ tasks: state: status: active: 3 - timeout: 5s + timeout: 10s - id: status type: CheckPod params: refTaskId: job status: Running - timeout: 5s + timeout: 10s diff --git a/resources/workflows/kueue/test-preemption.yml b/resources/workflows/kueue/test-preemption.yaml similarity index 100% rename from resources/workflows/kueue/test-preemption.yml rename to resources/workflows/kueue/test-preemption.yaml diff --git a/tests/ci/test_jobset.sh b/tests/ci/test_jobset.sh index f2ce4f1..e6f87cb 100755 --- a/tests/ci/test_jobset.sh +++ b/tests/ci/test_jobset.sh @@ -12,4 +12,4 @@ deploy_kwok deploy_jobset # Run knavigator with an example test -${REPO_HOME}/bin/knavigator -workflow ${REPO_HOME}/resources/workflows/k8s/test-jobset.yml -v 4 -cleanup +${REPO_HOME}/bin/knavigator -workflow ${REPO_HOME}/resources/workflows/jobset/test-jobset.yaml -v 4 -cleanup diff --git a/tests/ci/test_kueue.sh b/tests/ci/test_kueue.sh index 65e0451..ff4f52f 100755 --- a/tests/ci/test_kueue.sh +++ b/tests/ci/test_kueue.sh @@ -12,4 +12,4 @@ deploy_kwok deploy_kueue # Run knavigator with an example test -${REPO_HOME}/bin/knavigator -workflow ${REPO_HOME}/resources/workflows/kueue/test-job.yml -v 4 -cleanup +${REPO_HOME}/bin/knavigator -workflow ${REPO_HOME}/resources/workflows/kueue/test-job.yaml -v 4 -cleanup