Skip to content

Commit 367c838

Browse files
authored
fix: Fix --adapt-from-ct for externally managed jobset and kueue (#1192)
* feat: skip Kueue and Jobset manifest installs if managed by Helm * Add unit tests for helm-managed Kueue and Jobset * Refactor is_managed_by_helm to use jsonpath for speed and target deployments explicitly * Simplify is_managed_by_helm to only check managed-by label * Simplify code * Rename out to container_image in _should_install_jobset * Rename is_managed_by_helm to is_managed_externally * Fix pylint trailing whitespaces * Fix pyink formatting
1 parent b105893 commit 367c838

23 files changed

Lines changed: 243 additions & 32 deletions

recipes/Basic_cluster_adapt.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ data:
3838
[XPK] Breaking up a total of 2 commands into 1 batches
3939
[XPK] Pretending all the jobs succeeded
4040
[XPK] Enabling the jobset API on our cluster, to be deprecated when Jobset is globally available
41+
[XPK] Task: `Check if Jobset is installed` is implemented by the following command not running since it is a dry run.
42+
kubectl get deployment -n jobset-system -o jsonpath='{.items[*].spec.template.spec.containers[0].image}'
4143
[XPK] Try 1: Install Jobset on golden-cluster
4244
[XPK] Task: `Install Jobset on golden-cluster` is implemented by the following command not running since it is a dry run.
4345
kubectl apply --server-side --force-conflicts -f https://github.com/kubernetes-sigs/jobset/releases/download/v0.10.1/manifests.yaml

recipes/Basic_cluster_create.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ data:
8080
[XPK] Breaking up a total of 2 commands into 1 batches
8181
[XPK] Pretending all the jobs succeeded
8282
[XPK] Enabling the jobset API on our cluster, to be deprecated when Jobset is globally available
83+
[XPK] Task: `Check if Jobset is installed` is implemented by the following command not running since it is a dry run.
84+
kubectl get deployment -n jobset-system -o jsonpath='{.items[*].spec.template.spec.containers[0].image}'
8385
[XPK] Try 1: Install Jobset on golden-cluster
8486
[XPK] Task: `Install Jobset on golden-cluster` is implemented by the following command not running since it is a dry run.
8587
kubectl apply --server-side --force-conflicts -f https://github.com/kubernetes-sigs/jobset/releases/download/v0.10.1/manifests.yaml

recipes/Cluster_create_RayCluster.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ data:
8383
[XPK] Breaking up a total of 2 commands into 1 batches
8484
[XPK] Pretending all the jobs succeeded
8585
[XPK] Enabling the jobset API on our cluster, to be deprecated when Jobset is globally available
86+
[XPK] Task: `Check if Jobset is installed` is implemented by the following command not running since it is a dry run.
87+
kubectl get deployment -n jobset-system -o jsonpath='{.items[*].spec.template.spec.containers[0].image}'
8688
[XPK] Try 1: Install Jobset on golden-cluster
8789
[XPK] Task: `Install Jobset on golden-cluster` is implemented by the following command not running since it is a dry run.
8890
kubectl apply --server-side --force-conflicts -f https://github.com/kubernetes-sigs/jobset/releases/download/v0.10.1/manifests.yaml

recipes/Cluster_create_adapt_from_ct.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ data:
3939
[XPK] Breaking up a total of 2 commands into 1 batches
4040
[XPK] Pretending all the jobs succeeded
4141
[XPK] Enabling the jobset API on our cluster, to be deprecated when Jobset is globally available
42+
[XPK] Task: `Check if Jobset is installed` is implemented by the following command not running since it is a dry run.
43+
kubectl get deployment -n jobset-system -o jsonpath='{.items[*].spec.template.spec.containers[0].image}'
4244
[XPK] Try 1: Install Jobset on golden-cluster
4345
[XPK] Task: `Install Jobset on golden-cluster` is implemented by the following command not running since it is a dry run.
4446
kubectl apply --server-side --force-conflicts -f https://github.com/kubernetes-sigs/jobset/releases/download/v0.10.1/manifests.yaml

recipes/Cluster_create_for_multi-host_nodepool.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ data:
8282
[XPK] Breaking up a total of 2 commands into 1 batches
8383
[XPK] Pretending all the jobs succeeded
8484
[XPK] Enabling the jobset API on our cluster, to be deprecated when Jobset is globally available
85+
[XPK] Task: `Check if Jobset is installed` is implemented by the following command not running since it is a dry run.
86+
kubectl get deployment -n jobset-system -o jsonpath='{.items[*].spec.template.spec.containers[0].image}'
8587
[XPK] Try 1: Install Jobset on golden-cluster
8688
[XPK] Task: `Install Jobset on golden-cluster` is implemented by the following command not running since it is a dry run.
8789
kubectl apply --server-side --force-conflicts -f https://github.com/kubernetes-sigs/jobset/releases/download/v0.10.1/manifests.yaml

recipes/Cluster_create_for_single-host_nodepool.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ data:
8080
[XPK] Breaking up a total of 2 commands into 1 batches
8181
[XPK] Pretending all the jobs succeeded
8282
[XPK] Enabling the jobset API on our cluster, to be deprecated when Jobset is globally available
83+
[XPK] Task: `Check if Jobset is installed` is implemented by the following command not running since it is a dry run.
84+
kubectl get deployment -n jobset-system -o jsonpath='{.items[*].spec.template.spec.containers[0].image}'
8385
[XPK] Try 1: Install Jobset on golden-cluster
8486
[XPK] Task: `Install Jobset on golden-cluster` is implemented by the following command not running since it is a dry run.
8587
kubectl apply --server-side --force-conflicts -f https://github.com/kubernetes-sigs/jobset/releases/download/v0.10.1/manifests.yaml

recipes/Cluster_create_private.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ data:
8888
[XPK] Breaking up a total of 2 commands into 1 batches
8989
[XPK] Pretending all the jobs succeeded
9090
[XPK] Enabling the jobset API on our cluster, to be deprecated when Jobset is globally available
91+
[XPK] Task: `Check if Jobset is installed` is implemented by the following command not running since it is a dry run.
92+
kubectl get deployment -n jobset-system -o jsonpath='{.items[*].spec.template.spec.containers[0].image}'
9193
[XPK] Try 1: Install Jobset on golden-cluster-private
9294
[XPK] Task: `Install Jobset on golden-cluster-private` is implemented by the following command not running since it is a dry run.
9395
kubectl apply --server-side --force-conflicts -f https://github.com/kubernetes-sigs/jobset/releases/download/v0.10.1/manifests.yaml
@@ -369,6 +371,8 @@ data:
369371
[XPK] Breaking up a total of 2 commands into 1 batches
370372
[XPK] Pretending all the jobs succeeded
371373
[XPK] Enabling the jobset API on our cluster, to be deprecated when Jobset is globally available
374+
[XPK] Task: `Check if Jobset is installed` is implemented by the following command not running since it is a dry run.
375+
kubectl get deployment -n jobset-system -o jsonpath='{.items[*].spec.template.spec.containers[0].image}'
372376
[XPK] Try 1: Install Jobset on golden-cluster-private-ep
373377
[XPK] Task: `Install Jobset on golden-cluster-private-ep` is implemented by the following command not running since it is a dry run.
374378
kubectl apply --server-side --force-conflicts -f https://github.com/kubernetes-sigs/jobset/releases/download/v0.10.1/manifests.yaml
@@ -643,6 +647,8 @@ data:
643647
[XPK] Breaking up a total of 2 commands into 1 batches
644648
[XPK] Pretending all the jobs succeeded
645649
[XPK] Enabling the jobset API on our cluster, to be deprecated when Jobset is globally available
650+
[XPK] Task: `Check if Jobset is installed` is implemented by the following command not running since it is a dry run.
651+
kubectl get deployment -n jobset-system -o jsonpath='{.items[*].spec.template.spec.containers[0].image}'
646652
[XPK] Try 1: Install Jobset on golden-cluster-private-nosubnet
647653
[XPK] Task: `Install Jobset on golden-cluster-private-nosubnet` is implemented by the following command not running since it is a dry run.
648654
kubectl apply --server-side --force-conflicts -f https://github.com/kubernetes-sigs/jobset/releases/download/v0.10.1/manifests.yaml

recipes/Cluster_create_sub-slicing.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ data:
8383
[XPK] Breaking up a total of 2 commands into 1 batches
8484
[XPK] Pretending all the jobs succeeded
8585
[XPK] Enabling the jobset API on our cluster, to be deprecated when Jobset is globally available
86+
[XPK] Task: `Check if Jobset is installed` is implemented by the following command not running since it is a dry run.
87+
kubectl get deployment -n jobset-system -o jsonpath='{.items[*].spec.template.spec.containers[0].image}'
8688
[XPK] Try 1: Install Jobset on golden-cluster
8789
[XPK] Task: `Install Jobset on golden-cluster` is implemented by the following command not running since it is a dry run.
8890
kubectl apply --server-side --force-conflicts -f https://github.com/kubernetes-sigs/jobset/releases/download/v0.10.1/manifests.yaml

recipes/Cluster_create_super-slicing.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ data:
8989
[XPK] Breaking up a total of 2 commands into 1 batches
9090
[XPK] Pretending all the jobs succeeded
9191
[XPK] Enabling the jobset API on our cluster, to be deprecated when Jobset is globally available
92+
[XPK] Task: `Check if Jobset is installed` is implemented by the following command not running since it is a dry run.
93+
kubectl get deployment -n jobset-system -o jsonpath='{.items[*].spec.template.spec.containers[0].image}'
9294
[XPK] Try 1: Install Jobset on golden-cluster
9395
[XPK] Task: `Install Jobset on golden-cluster` is implemented by the following command not running since it is a dry run.
9496
kubectl apply --server-side --force-conflicts -f https://github.com/kubernetes-sigs/jobset/releases/download/v0.10.1/manifests.yaml

recipes/Cluster_create_with_CPU_and_memory_limits_above_capacity.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ data:
8080
[XPK] Breaking up a total of 2 commands into 1 batches
8181
[XPK] Pretending all the jobs succeeded
8282
[XPK] Enabling the jobset API on our cluster, to be deprecated when Jobset is globally available
83+
[XPK] Task: `Check if Jobset is installed` is implemented by the following command not running since it is a dry run.
84+
kubectl get deployment -n jobset-system -o jsonpath='{.items[*].spec.template.spec.containers[0].image}'
8385
[XPK] Try 1: Install Jobset on golden-cluster
8486
[XPK] Task: `Install Jobset on golden-cluster` is implemented by the following command not running since it is a dry run.
8587
kubectl apply --server-side --force-conflicts -f https://github.com/kubernetes-sigs/jobset/releases/download/v0.10.1/manifests.yaml

0 commit comments

Comments
 (0)