@@ -31,6 +31,7 @@ trap cleanup EXIT
3131
3232# Parse named parameters
3333TEST_THIRD_PARTY_INTEGRATIONS=${TEST_THIRD_PARTY_INTEGRATIONS:- " false" }
34+ TEST_HAMI=${TEST_HAMI:- " false" }
3435LOCAL_IMAGES_BUILD=${LOCAL_IMAGES_BUILD:- " false" }
3536INSTALL_VPA=${INSTALL_VPA:- " false" }
3637SKIP_KAI_INSTALL=${SKIP_KAI_INSTALL:- " false" }
@@ -41,6 +42,10 @@ while [[ $# -gt 0 ]]; do
4142 TEST_THIRD_PARTY_INTEGRATIONS=" true"
4243 shift
4344 ;;
45+ --test-hami)
46+ TEST_HAMI=" true"
47+ shift
48+ ;;
4449 --local-images-build)
4550 LOCAL_IMAGES_BUILD=" true"
4651 shift
@@ -62,8 +67,9 @@ while [[ $# -gt 0 ]]; do
6267 shift 2
6368 ;;
6469 -h|--help)
65- echo " Usage: $0 [--test-third-party-integrations] [--local-images-build] [--install-vpa] [--skip-kai-install] [--feature-config <config>] [--kind-config <path>]"
70+ echo " Usage: $0 [--test-third-party-integrations] [--test-hami] [-- local-images-build] [--install-vpa] [--skip-kai-install] [--feature-config <config>] [--kind-config <path>]"
6671 echo " --test-third-party-integrations: Install third party operators for compatibility testing"
72+ echo " --test-hami: Enable HAMi/hamicore integration (binder hamicore plugin + kai-resource-isolator)"
6773 echo " --local-images-build: Build and use local images instead of pulling from registry"
6874 echo " --install-vpa: Install Vertical Pod Autoscaler and metrics-server"
6975 echo " --skip-kai-install: Prepare the cluster (and images/chart with --local-images-build) without installing KAI (e.g. for gitops e2e tests)"
@@ -79,6 +85,17 @@ while [[ $# -gt 0 ]]; do
7985 esac
8086done
8187
88+ # Extra helm --set flags for HAMi/hamicore. Kind e2e has no nvidia RuntimeClass, so clear
89+ # the defaults that would otherwise reject GPU-fraction pods at admission.
90+ HAMI_HELM_SETS=()
91+ if [ " $TEST_HAMI " = " true" ]; then
92+ HAMI_HELM_SETS+=(
93+ --set " binder.plugins.hamicore.enabled=true"
94+ --set " binder.resourceReservation.runtimeClassName="
95+ --set " admission.gpuFractionRuntimeClassName="
96+ )
97+ fi
98+
8299if [[ -n " $KIND_CONFIG " && " $FEATURE_CONFIG " != " default" ]]; then
83100 echo " --feature-config cannot be used together with --kind-config"
84101 exit 1
@@ -147,9 +164,6 @@ if [ "$TEST_THIRD_PARTY_INTEGRATIONS" = "true" ]; then
147164 ${REPO_ROOT} /hack/third_party_integrations/deploy_knative.sh
148165 ${REPO_ROOT} /hack/third_party_integrations/deploy_lws.sh
149166 ${REPO_ROOT} /hack/third_party_integrations/deploy_jobset.sh
150- # HAMi-core / GPU-sharing isolation + optional VRAM metrics (:9394).
151- # Soft-gated in hamicore e2e when the webhook / monitor are absent.
152- ${REPO_ROOT} /hack/third_party_integrations/deploy_isolator.sh
153167fi
154168
155169# Build and install kai-scheduler
@@ -207,7 +221,8 @@ if [ "$LOCAL_IMAGES_BUILD" = "true" ]; then
207221 else
208222 helm upgrade -i kai-scheduler ./charts/kai-scheduler-$PACKAGE_VERSION .tgz -n kai-scheduler --create-namespace \
209223 --values ${REPO_ROOT} /hack/kai-scheduler-fake-npe-values.yaml \
210- --set " global.gpuSharing=true" --set " global.registry=localhost:30100" --set " prometheus.enabled=true" --debug --wait
224+ --set " global.gpuSharing=true" --set " global.registry=localhost:30100" --set " prometheus.enabled=true" \
225+ " ${HAMI_HELM_SETS[@]} " --debug --wait
211226 rm -rf ./charts/kai-scheduler-$PACKAGE_VERSION .tgz
212227 fi
213228 cd ${REPO_ROOT} /hack
@@ -216,7 +231,8 @@ elif [ "$SKIP_KAI_INSTALL" = "true" ]; then
216231else
217232 helm upgrade -i kai-scheduler oci://ghcr.io/kai-scheduler/kai-scheduler/kai-scheduler -n kai-scheduler --create-namespace \
218233 --values ${REPO_ROOT} /hack/kai-scheduler-fake-npe-values.yaml \
219- --set " global.gpuSharing=true" --set " prometheus.enabled=true" --wait --version " $PACKAGE_VERSION "
234+ --set " global.gpuSharing=true" --set " prometheus.enabled=true" \
235+ " ${HAMI_HELM_SETS[@]} " --wait --version " $PACKAGE_VERSION "
220236fi
221237
222238if [ " $SKIP_KAI_INSTALL " != " true" ]; then
@@ -225,4 +241,11 @@ if [ "$SKIP_KAI_INSTALL" != "true" ]; then
225241 kubectl create rolebinding fake-status-updater --clusterrole=pods-patcher --serviceaccount=gpu-operator:status-updater -n kai-resource-reservation
226242fi
227243
244+ # HAMi resource isolation (kai-resource-isolator). Deeper than third-party CRD
245+ # operators: paired with binder hamicore helm values above. Soft-gated in
246+ # hamicore e2e when the webhook / monitor are absent.
247+ if [ " $TEST_HAMI " = " true" ]; then
248+ ${REPO_ROOT} /hack/hami/deploy_isolator.sh
249+ fi
250+
228251echo " Cluster setup complete. Cluster name: $CLUSTER_NAME "
0 commit comments