Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified test/scripts/openshift-ci/common.sh
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions test/scripts/openshift-ci/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ fi

: "${SETUP_E2E:=true}"
if [ "$SETUP_E2E" = "true" ]; then
echo "Installing on cluster"
echo "Installing on the cluster"
pushd $PROJECT_ROOT >/dev/null
./test/scripts/openshift-ci/setup-e2e-tests.sh "${MARKERS}" "${PARALLELISM}" "${DEPLOYMENT_PROFILE}" | tee 2>&1 ./test/scripts/openshift-ci/setup-e2e-tests-"${MARKERS// /_}".log
./test/scripts/openshift-ci/setup-e2e-tests.sh "${MARKERS}" "${DEPLOYMENT_PROFILE}" | tee 2>&1 ./test/scripts/openshift-ci/setup-e2e-tests-"${MARKERS// /_}".log
popd
fi

# Use certify go module to get the CA certs
export REQUESTS_CA_BUNDLE="/tmp/ca.crt"
echo "REQUESTS_CA_BUNDLE=$(cat ${REQUESTS_CA_BUNDLE})"

echo "Run E2E tests: ${MARKERS}"
echo "⏳ Running E2E tests: ${MARKERS}"
pushd $PROJECT_ROOT >/dev/null
./test/scripts/gh-actions/run-e2e-tests.sh "${MARKERS}" "${PARALLELISM}" "${DEPLOYMENT_PROFILE}" | tee 2>&1 ./test/scripts/openshift-ci/run-e2e-tests-"${MARKERS// /_}".log
popd
6 changes: 2 additions & 4 deletions test/scripts/openshift-ci/setup-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ source "$SCRIPT_DIR/common.sh"
PROJECT_ROOT="$(find_project_root "$SCRIPT_DIR")"

readonly MARKERS="${1:-raw}"
readonly PARALLELISM="${2:-1}"

readonly DEPLOYMENT_PROFILE="${3:-serverless}"
readonly DEPLOYMENT_PROFILE="${2:-serverless}"
validate_deployment_profile "${DEPLOYMENT_PROFILE}"

: "${NS:=opendatahub}"
Expand Down Expand Up @@ -90,7 +88,7 @@ fi

if [[ "${DEPLOYMENT_PROFILE}" == "llm-d" ]]; then
echo "⏳ Installing llm-d prerequisites"
$SCRIPT_DIR/setup-llm.sh --skip-kserve
$SCRIPT_DIR/setup-llm-d.sh --with-kserve=false
fi

echo "⏳ Waiting for KServe CRDs"
Expand Down
94 changes: 94 additions & 0 deletions test/scripts/openshift-ci/setup-llm-d.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#!/usr/bin/env bash
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/common.sh"
source "$SCRIPT_DIR/version.sh"
PROJECT_ROOT="$(find_project_root "$SCRIPT_DIR")"

WITH_KSERVE="true"
WITH_KUADRANT="false"

show_usage() {
cat <<EOF
Sets up llm-d pre-requisites on OpenShift:
- Cert Manager
- Leader Worker Set
- Gateway API configuration for Cluster Ingress Operator
- KServe
- Kuadrant/Red Hat Connectivity Link (optional)

Usage: $0 [OPTIONS]

Options:
--with-kserve[=true|false] Enable/disable KServe installation (default: ✅ true)
--with-kuadrant[=true|false] Enable/disable Kuadrant installation (default: ❌ false)
-h, --help Show this help message
Comment on lines +37 to +39
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default, kserve will be installed so why we need to Enable the option?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kuadrant has the same behavior, but we need an option that does the reverse.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to have consistent flags to avoid confusion. Before it was --skip-kserve --deploy-kuadrant. Maybe having this flags aligned makes it more natural? WDYT?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should set Kuadrant’s default value to true, with the option to disable it using --skip-kserve and --skip-kuadrant. While Kuadrant may not be necessary for LLMD development installations, having it enabled by default would be more useful for other scenarios.

Copy link
Author

@bartoszmajsak bartoszmajsak Sep 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the original behavior brought in #876. I "refactored" the flags logic, but kept it.

echo "Default behavior:"
echo "  • KServe deployment: enabled"
echo "  • Kuadrant deployment: disabled"

Are you suggesting to keep them both enabled instead?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly. My suggestion is to have both enabled by default, and let users disable them with --skip-kserve and --skip-kuadrant if needed.

EOF
}

parse_bool() {
case "$1" in
true|false) printf %s "$1" ;;
*) echo "Error: expected true|false, got '$1'" >&2; exit 1 ;;
esac
}

for arg in "$@"; do
case "$arg" in
--with-kserve) WITH_KSERVE=true ;;
--with-kserve=*) WITH_KSERVE="$(parse_bool "${arg#*=}")" ;;
--with-kuadrant) WITH_KUADRANT=true ;;
--with-kuadrant=*) WITH_KUADRANT="$(parse_bool "${arg#*=}")" ;;
-h|--help) show_usage; exit 0 ;;
*) echo "Error: Unknown option '$arg'"; show_usage; exit 1 ;;
esac
done

echo "🔧 Configuration:"
echo " KServe deployment: $([ "$WITH_KSERVE" == "true" ] && echo "✅ enabled" || echo "❌ disabled")"
echo " Kuadrant deployment: $([ "$WITH_KUADRANT" == "true" ] && echo "✅ enabled" || echo "❌ disabled")"
echo ""

server_version=$(get_openshift_server_version)
min_version="4.19.9"
if is_version_newer "${server_version}" "${min_version}"; then
echo "✅ OpenShift version (${server_version}) is newer than ${min_version} - installing components..."
else
echo "❌ OpenShift version (${server_version}) older than ${min_version}. This is not supported environment."
exit 1
fi

exit 0

$SCRIPT_DIR/infra/deploy.cert-manager.sh
$SCRIPT_DIR/infra/deploy.lws.sh

if [ "${WITH_KSERVE}" == "true" ]; then
kubectl create ns opendatahub || true

kubectl kustomize config/crd/ | kubectl apply --server-side=true -f -
wait_for_crd llminferenceserviceconfigs.serving.kserve.io 90s

kustomize build config/overlays/odh | kubectl apply --server-side=true --force-conflicts -f -
wait_for_pod_ready "opendatahub" "control-plane=kserve-controller-manager" 300s
fi

$SCRIPT_DIR/infra/deploy.gateway.ingress.sh

if [ "${WITH_KUADRANT}" == "true" ]; then
$SCRIPT_DIR/infra/deploy.kuadrant.sh
fi
99 changes: 0 additions & 99 deletions test/scripts/openshift-ci/setup-llm.sh

This file was deleted.

Empty file modified test/scripts/openshift-ci/teardown-e2e-setup.sh
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions test/scripts/openshift-ci/version.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ get_openshift_server_version() {
return 1
}

# version_compare <version1> <version2>
# is_version_newer <version1> <version2>
# Compares two version strings in semantic version format (e.g., "4.19.9")
# Returns 0 if version1 >= version2, 1 otherwise
version_compare() {
is_version_newer() {
local version1="$1"
local version2="$2"

Expand Down
Loading