Skip to content

Commit

Permalink
update multikueue e2e test scripts to support running tfjob
Browse files Browse the repository at this point in the history
  • Loading branch information
mszadkow committed Jul 16, 2024
1 parent 2af2e6a commit a57b642
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
13 changes: 13 additions & 0 deletions hack/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ export JOBSET_MANIFEST=https://github.com/kubernetes-sigs/jobset/releases/downlo
export JOBSET_IMAGE=registry.k8s.io/jobset/jobset:${JOBSET_VERSION}
export JOBSET_CRDS=${ROOT_DIR}/dep-crds/jobset-operator/

export KUBEFLOW_VERSION=v1.7.0
export TFJOB_MANIFEST=https://github.com/kubeflow/training-operator/manifests/overlays/standalone?ref=${KUBEFLOW_VERSION}
#no matching semver tag unfortunately
export TFJOB_IMAGE=kubeflow/training-operator:v1-855e096
export TFJOB_CRDS=${ROOT_DIR}/dep-crds/training-operator/kubeflow.org_tfjobs.yaml

# $1 - cluster name
function cluster_cleanup {
kubectl config use-context kind-$1
Expand Down Expand Up @@ -67,6 +73,13 @@ function install_jobset {
kubectl apply --server-side -f ${JOBSET_MANIFEST}
}

#$1 - cluster name
function install_kubeflow {
cluster_kind_load_image ${1} ${TFJOB_IMAGE}
kubectl config use-context kind-${1}
kubectl apply -k ${TFJOB_MANIFEST}
}

export INITIAL_IMAGE=$($YQ '.images[] | select(.name == "controller") | [.newName, .newTag] | join(":")' config/components/manager/kustomization.yaml)

function restore_managers_image {
Expand Down
15 changes: 14 additions & 1 deletion hack/multikueue-e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@ function kind_load {
install_jobset $MANAGER_KIND_CLUSTER_NAME
install_jobset $WORKER1_KIND_CLUSTER_NAME
install_jobset $WORKER2_KIND_CLUSTER_NAME

#KUBEFLOW SETUP
#MANAGER
# Only install the CRDs and not the controller to be able to
# have TF Jobs admitted without execution in the manager cluster.
kubectl config use-context kind-${MANAGER_KIND_CLUSTER_NAME}
kubectl apply --server-side -f ${TFJOB_CRDS}

#WORKERS
docker pull kubeflow/training-operator:v1-855e096
install_kubeflow $WORKER1_KIND_CLUSTER_NAME
install_kubeflow $WORKER2_KIND_CLUSTER_NAME

fi
}

Expand All @@ -94,4 +107,4 @@ startup
kind_load
kueue_deploy

$GINKGO $GINKGO_ARGS --junit-report=junit.xml --output-dir=$ARTIFACTS -v ./test/e2e/multikueue/...
$GINKGO $GINKGO_ARGS --junit-report=junit.xml --output-dir=$ARTIFACTS -v ./test/e2e/multikueue/... || read -p "wait for me son"

0 comments on commit a57b642

Please sign in to comment.