Skip to content

Commit f0409ba

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents b7e48c3 + 5cf6f39 commit f0409ba

5 files changed

Lines changed: 182 additions & 206 deletions

File tree

examples/deploy-demo/common.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,15 @@ EOF
851851
--for=condition=Ready --timeout=300s
852852
log "LLMBatchGateway is ready."
853853

854+
step "Waiting for AIGateway to be ready..."
855+
kubectl wait aigateway/default-aigateway --for=condition=Ready --timeout=300s
856+
log "AIGateway is ready."
857+
858+
# TODO: Change to die once https://github.com/opendatahub-io/ai-gateway-operator/issues/47 is fixed.
859+
step "Waiting for DataScienceCluster to be ready..."
860+
kubectl wait dsc/default-dsc --for=condition=Ready --timeout=60s \
861+
|| warn "DataScienceCluster is not Ready (known issue: github.com/opendatahub-io/ai-gateway-operator/issues/47)"
862+
854863
create_batch_httproute
855864
create_batch_destinationrule
856865
}
@@ -901,6 +910,8 @@ EOF
901910
|| die "Internal Gateway '${BATCH_INTERNAL_GATEWAY_NAME}' not programmed after 300s."
902911

903912
log "Internal Gateway created (ClusterIP, no TLS, no rate limit)."
913+
914+
check_batch_internal_gateway
904915
}
905916

906917
# Verifies the internal gateway is ClusterIP-only and not exposed externally.
@@ -1073,6 +1084,7 @@ JSONL
10731084
_BATCH_FILE_ID=$(_jval id "$body")
10741085
echo " File uploaded: ${_BATCH_FILE_ID}"
10751086
else
1087+
echo " File upload failed (HTTP ${http_code}): ${body}"
10761088
return 1
10771089
fi
10781090

@@ -1089,6 +1101,7 @@ JSONL
10891101
_BATCH_ID=$(_jval id "$body")
10901102
echo " Batch created: ${_BATCH_ID}"
10911103
else
1104+
echo " Batch creation failed (HTTP ${http_code}): ${body}"
10921105
return 1
10931106
fi
10941107
}
@@ -1263,4 +1276,5 @@ JSONL
12631276
fi
12641277
echo " Passed: ${_TEST_PASSED} Failed: ${_TEST_FAILED} Total: ${_TEST_TOTAL}"
12651278

1279+
return "${_TEST_FAILED}"
12661280
}

examples/deploy-demo/deploy-k8s.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,6 @@ cmd_install() {
846846
create_batch_internal_gateway
847847
create_batch_llm_route
848848
apply_batch_llm_auth_policy
849-
check_batch_internal_gateway
850849

851850
deploy_batch_gateway_k8s
852851
apply_batch_auth_policy
@@ -926,16 +925,18 @@ EOF
926925
local llm_url="${GATEWAY_URL}/${LLM_NAMESPACE}/${MODEL_NAME}/v1/chat/completions"
927926
local inference_payload="{\"model\":\"${MODEL_NAME}\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"max_tokens\":10}"
928927

929-
check_batch_internal_gateway
930-
928+
local test_failures=0
931929
run_tests "${llm_url}" "${GATEWAY_URL}" "${MODEL_NAME}" \
932930
"Authorization: Bearer ${token}" \
933931
"Authorization: Bearer ${unauth_token}" \
934-
"${inference_payload}"
932+
"${inference_payload}" \
933+
|| test_failures=$?
935934

936935
if [ "${ENABLE_FLOW_CONTROL}" = "true" ]; then
937936
verify_flow_control_runtime
938937
fi
938+
939+
return "${test_failures}"
939940
}
940941

941942
# ── Uninstall ────────────────────────────────────────────────────────────────

examples/deploy-demo/deploy-maas.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,6 @@ cmd_install() {
644644
create_batch_internal_gateway
645645
create_batch_llm_httproute
646646
apply_batch_llm_auth_policy
647-
check_batch_internal_gateway
648647

649648
deploy_batch_gateway_maas
650649
apply_batch_auth_policy
@@ -696,13 +695,15 @@ cmd_test() {
696695
local llm_url="${gw_url}/${LLM_NAMESPACE}/${MAAS_ISVC_NAME}/v1/chat/completions"
697696
local inference_payload="{\"model\":\"${MAAS_MODEL_NAME}\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"max_tokens\":10}"
698697

699-
check_batch_internal_gateway
700-
698+
local test_failures=0
701699
run_tests "${llm_url}" "${gw_url}" "${MAAS_MODEL_NAME}" \
702700
"Authorization: Bearer ${api_key}" \
703701
"Authorization: Bearer ${unauth_api_key}" \
704702
"${inference_payload}" \
705-
"X-MaaS-Subscription: batch-test-subscription"
703+
"X-MaaS-Subscription: batch-test-subscription" \
704+
|| test_failures=$?
705+
706+
return "${test_failures}"
706707
}
707708

708709
# ── Uninstall ────────────────────────────────────────────────────────────────

examples/deploy-demo/deploy-rhoai.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ Batch-route has no authorization — model-level authz is enforced downstream wh
5757

5858
| Mode | Command |
5959
|------|---------|
60-
| Auto-detect latest RHOAI (default) | `bash examples/deploy-demo/deploy-rhoai.sh install` |
61-
| Specific RHOAI version | `RHOAI_VERSION=3.4 bash examples/deploy-demo/deploy-rhoai.sh install` |
62-
| Custom RHOAI catalog | `CUSTOM_CATALOG=quay.io/rhoai/rhoai-fbc-fragment:...` <br> `bash examples/deploy-demo/deploy-rhoai.sh install` |
60+
| Latest stable RHOAI (default) | `bash examples/deploy-demo/deploy-rhoai.sh install` |
61+
| Specific RHOAI channel | `RHOAI_CHANNEL=stable-3.4 bash examples/deploy-demo/deploy-rhoai.sh install` |
62+
| Custom RHOAI catalog | `CUSTOM_CATALOG=quay.io/rhoai/rhoai-fbc-fragment:...` <br> `RHOAI_CHANNEL=beta bash examples/deploy-demo/deploy-rhoai.sh install` |
6363
| ODH instead of RHOAI | `OPERATOR_TYPE=odh bash examples/deploy-demo/deploy-rhoai.sh install` |
6464

6565
> See [Environment Variables](#environment-variables) for common parameters.
@@ -133,8 +133,7 @@ Use that only on **ephemeral or dedicated** demo clusters. See [issue #309](http
133133
| `GW_MAX_BACKOFF` | `60s` | Model gateway max retry backoff |
134134
| `OPERATOR_TYPE` | `rhoai` | Operator type: `rhoai` or `odh` |
135135
| `CUSTOM_CATALOG` || Custom catalog image for operator (creates CatalogSource) |
136-
| `RHOAI_VERSION` | (auto-detected) | RHOAI version (e.g. `3.4`). Auto-detected from PackageManifest if not set |
137-
| `RHOAI_CHANNEL` | (auto-detected) | RHOAI OLM channel (e.g. `stable-3.4`). Auto-detected if not set |
136+
| `RHOAI_CHANNEL` | `stable-3.x` | RHOAI OLM channel |
138137
| `ODH_CHANNEL` | `fast-3` | ODH OLM channel (used when `OPERATOR_TYPE=odh`) |
139138
| `KUADRANT_NAMESPACE` | `kuadrant-system` | Namespace for Connectivity Link (Kuadrant) |
140139
| `GATEWAY_CLASS_NAME` | `openshift-default` | GatewayClass name |

0 commit comments

Comments
 (0)