Skip to content

Commit 10db552

Browse files
committed
Merge remote-tracking branch 'upstream/main' into rhoai-3.5
2 parents 4414024 + 8e7d112 commit 10db552

10 files changed

Lines changed: 319 additions & 538 deletions

File tree

docs/guides/deploy-k8s.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -599,20 +599,6 @@ spec:
599599
- group: inference.networking.k8s.io
600600
kind: InferencePool
601601
name: ${LLMD_POOL_NAME}
602-
- matches:
603-
- path:
604-
type: PathPrefix
605-
value: /${LLM_NS}/${MODEL_NAME}
606-
filters:
607-
- type: URLRewrite
608-
urlRewrite:
609-
path:
610-
type: ReplacePrefixMatch
611-
replacePrefixMatch: /
612-
backendRefs:
613-
- group: inference.networking.k8s.io
614-
kind: InferencePool
615-
name: ${LLMD_POOL_NAME}
616602
EOF
617603
```
618604

@@ -784,20 +770,6 @@ spec:
784770
- group: inference.networking.k8s.io
785771
kind: InferencePool
786772
name: ${LLMD_POOL_NAME}
787-
- matches:
788-
- path:
789-
type: PathPrefix
790-
value: /${LLM_NS}/${MODEL_NAME}
791-
filters:
792-
- type: URLRewrite
793-
urlRewrite:
794-
path:
795-
type: ReplacePrefixMatch
796-
replacePrefixMatch: /
797-
backendRefs:
798-
- group: inference.networking.k8s.io
799-
kind: InferencePool
800-
name: ${LLMD_POOL_NAME}
801773
EOF
802774
```
803775

docs/guides/deploy-maas.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -439,20 +439,6 @@ spec:
439439
- group: inference.networking.x-k8s.io
440440
kind: InferencePool
441441
name: ${POOL_NAME}
442-
- matches:
443-
- path:
444-
type: PathPrefix
445-
value: /${LLM_NS}/${ISVC_NAME}
446-
filters:
447-
- type: URLRewrite
448-
urlRewrite:
449-
path:
450-
type: ReplacePrefixMatch
451-
replacePrefixMatch: /
452-
backendRefs:
453-
- group: inference.networking.x-k8s.io
454-
kind: InferencePool
455-
name: ${POOL_NAME}
456442
EOF
457443
```
458444

docs/guides/deploy-rhoai.md

Lines changed: 14 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Both the LLM route and the batch route use **kubernetesTokenReview** for authent
4646

4747
### 1.4 Authorization Model
4848

49-
Model access is controlled through Kubernetes RBAC. Users need `get` permission on the specific `LLMInferenceService` resource to access a model. This is granted by creating a Role and RoleBinding in the model's namespace (see [Enabling authentication and authorization for LLM inference service](https://docs.redhat.com/en/documentation/red_hat_openshift_ai_self-managed/3.4/html/deploy_models_using_distributed_inference_with_llm-d/enabling-authentication-and-authorization-for-llm-inference-service_distributed-inference) for details).
49+
Model access is controlled through Kubernetes RBAC. Users need `get` permission on the specific `LLMInferenceService` resource to access a model. This is granted by creating a Role and RoleBinding in the model's namespace (see [Enabling authentication and authorization for LLM inference service](https://docs.redhat.com/en/documentation/red_hat_openshift_ai_self-managed/3.5/html/deploy_models_using_distributed_inference_with_llm-d/enabling-authentication-and-authorization-for-llm-inference-service_distributed-inference) for details).
5050

5151
- **LLM route**: SubjectAccessReview checks if user can `get llminferenceservices/<name>` — unauthorized requests are rejected with **403**
5252
- **Batch route**: No authorization check — authorization is enforced by the batch-llm-route on the Internal Gateway when the processor forwards inference requests with the user's original token
@@ -287,7 +287,7 @@ oc rollout status deployment/openshift-ai-inference-openshift-default -n openshi
287287

288288
### 3.4 Install RHCL
289289

290-
Follow [Red Hat Connectivity Link docs](https://docs.redhat.com/en/documentation/red_hat_connectivity_link/1.3) to install RHCL
290+
Follow [Red Hat Connectivity Link docs](https://docs.redhat.com/en/documentation/red_hat_connectivity_link) to install RHCL
291291

292292
Set the variable used throughout this section:
293293
```bash
@@ -476,9 +476,9 @@ oc wait datasciencecluster/default-dsc --for=jsonpath='{.status.phase}'=Ready --
476476
477477
### 3.6 Deploy model with llm-d
478478
479-
Follow [deploy model doc](https://docs.redhat.com/en/documentation/red_hat_openshift_ai_self-managed/3.4/html/deploy_models_using_distributed_inference_with_llm-d/index) to deploy model with LLM-D
479+
Follow [deploy model doc](https://docs.redhat.com/en/documentation/red_hat_openshift_ai_self-managed/3.5/html/deploy_models_using_distributed_inference_with_llm-d/index) to deploy model with LLM-D
480480
481-
For more examples: [kserve samples repo](https://github.com/red-hat-data-services/kserve/tree/main/docs/samples/llmisvc) (switch to the `rhoai-<version>` branch matching your RHOAI version for version-specific samples)
481+
For more examples: [kserve samples repo](https://github.com/red-hat-data-services/kserve/tree/rhoai-3.5/docs/samples/llmisvc) (switch to the `rhoai-<version>` branch matching your RHOAI version for version-specific samples)
482482
483483
The following example deploys a simulated model with `LLMInferenceService`.
484484
@@ -521,10 +521,13 @@ spec:
521521
- type: round-robin-fairness-policy
522522
- type: global-strict-fairness-policy
523523
- type: slo-deadline-ordering-policy
524+
- type: utilization-detector
525+
parameters:
526+
queueDepthThreshold: 5
527+
kvCacheUtilThreshold: 0.8
524528
schedulingProfiles: []
525529
saturationDetector:
526-
queueDepthThreshold: 5
527-
kvCacheUtilThreshold: 0.8
530+
pluginRef: utilization-detector
528531
flowControl:
529532
maxBytes: 4294967296
530533
defaultRequestTTL: 30s
@@ -664,7 +667,7 @@ EOF
664667

665668
### 3.8 Configure TokenRateLimitPolicy for LLMInferenceService
666669

667-
Configure per-user token rate limiting for inference requests. See [Red Hat Connectivity Link docs](https://docs.redhat.com/en/documentation/red_hat_connectivity_link/1.3) for details. The following is an example configuration.
670+
Configure per-user token rate limiting for inference requests. See [Red Hat Connectivity Link docs](https://docs.redhat.com/en/documentation/red_hat_connectivity_link) for details. The following is an example configuration.
668671

669672
> **Note**: The TokenRateLimitPolicy targets the Gateway (not HTTPRoute) because LLMInferenceService dynamically generates the inference HTTPRoute name.
670673
@@ -697,7 +700,7 @@ EOF
697700
# wait for policy to be enforced
698701
oc wait tokenratelimitpolicy/inference-token-limit \
699702
--for="condition=Enforced=true" \
700-
-n openshift-ingress --timeout=120s
703+
-n openshift-ingress --timeout=180s
701704
```
702705
</details>
703706

@@ -803,20 +806,6 @@ spec:
803806
- group: inference.networking.x-k8s.io
804807
kind: InferencePool
805808
name: ${POOL_NAME}
806-
- matches:
807-
- path:
808-
type: PathPrefix
809-
value: /${LLM_NS}/${ISVC_NAME}
810-
filters:
811-
- type: URLRewrite
812-
urlRewrite:
813-
path:
814-
type: ReplacePrefixMatch
815-
replacePrefixMatch: /
816-
backendRefs:
817-
- group: inference.networking.x-k8s.io
818-
kind: InferencePool
819-
name: ${POOL_NAME}
820809
EOF
821810
```
822811

@@ -874,18 +863,10 @@ EOF
874863
875864
</details>
876865

877-
There are two ways to deploy the batch-gateway components. Choose **one** of the following sub-sections:
878-
879-
| | 3.9.1 LLMBatchGateway CR | 3.9.2 Helm chart |
880-
|---|---|---|
881-
| **Requires** | RHOAI with `aigateway` enabled ([3.5](#35-install-rhoai)) | `helm` CLI only |
882-
| **Image management** | Operator-pinned (from RHOAI release) | Manual (set per image) |
883-
| **Lifecycle** | Declarative CR, operator reconciles | Helm release |
884-
885-
Both options require the same dependencies (Redis, PostgreSQL, MinIO) and produce the same result.
866+
The batch-gateway is deployed via the `LLMBatchGateway` CR, which is managed by the batch-gateway-operator (deployed automatically when `aigateway.batchGateway.managementState: Managed` is set in the DataScienceCluster).
886867

887868
<details>
888-
<summary>Create namespace and install dependencies (required for both options)</summary>
869+
<summary>Create namespace and install dependencies</summary>
889870

890871
```bash
891872
oc create namespace "${BATCH_NS}" 2>/dev/null || true
@@ -995,10 +976,6 @@ oc create secret generic batch-gateway-secrets \
995976
996977
</details>
997978

998-
#### 3.9.1 Option A: Deploy via LLMBatchGateway CR
999-
1000-
> **Prerequisite**: The DataScienceCluster must have `aigateway.managementState: Managed` with `aigateway.batchGateway.managementState: Managed` (see [3.5](#35-install-rhoai)). This deploys the ai-gateway-operator, which in turn deploys the batch-gateway-operator.
1001-
1002979
<details>
1003980
<summary>Create LLMBatchGateway CR</summary>
1004981

@@ -1066,81 +1043,12 @@ oc wait llmbatchgateway/batch-gateway -n ${BATCH_NS} \
10661043
> fileStorage:
10671044
> fs:
10681045
> basePath: /tmp/batch-gateway
1069-
> claimName: batch-gateway-files
1046+
> claimName: <your-pvc-name>
10701047
> ```
10711048
> The PVC must have `ReadWriteMany` access mode (requires NFS, CephFS, or similar).
10721049
10731050
</details>
10741051
1075-
#### 3.9.2 Option B: Deploy via Helm chart
1076-
1077-
<details>
1078-
<summary>Install batch-gateway with Helm</summary>
1079-
1080-
```bash
1081-
CHART_VERSION=0.2.0
1082-
IMAGE_TAG=rhoai-3.5-ea.2
1083-
APISERVER_REPO=quay.io/rhoai/odh-llm-d-batch-gateway-apiserver-rhel9
1084-
PROCESSOR_REPO=quay.io/rhoai/odh-llm-d-batch-gateway-processor-rhel9
1085-
GC_REPO=quay.io/rhoai/odh-llm-d-batch-gateway-gc-rhel9
1086-
```
1087-
1088-
```bash
1089-
# Get model URL from the Internal Gateway service
1090-
INTERNAL_GW_SVC=$(oc get svc -n openshift-ingress \
1091-
-l "gateway.networking.k8s.io/gateway-name=batch-internal-gateway" \
1092-
-o jsonpath='{.items[0].metadata.name}')
1093-
MODEL_URL="http://${INTERNAL_GW_SVC}.openshift-ingress.svc.cluster.local/${LLM_NS}/${ISVC_NAME}"
1094-
1095-
# Install batch-gateway from OCI chart
1096-
helm upgrade --install batch-gateway \
1097-
oci://ghcr.io/llm-d-incubation/charts/batch-gateway \
1098-
--version ${CHART_VERSION} \
1099-
--namespace ${BATCH_NS} \
1100-
--set "apiserver.image.repository=${APISERVER_REPO}" \
1101-
--set "apiserver.image.tag=${IMAGE_TAG}" \
1102-
--set "processor.image.repository=${PROCESSOR_REPO}" \
1103-
--set "processor.image.tag=${IMAGE_TAG}" \
1104-
--set "gc.image.repository=${GC_REPO}" \
1105-
--set "gc.image.tag=${IMAGE_TAG}" \
1106-
--set "global.secretName=batch-gateway-secrets" \
1107-
--set "global.dbClient.type=postgresql" \
1108-
--set "global.fileClient.type=s3" \
1109-
--set "global.fileClient.s3.endpoint=http://minio.${BATCH_NS}.svc.cluster.local:9000" \
1110-
--set "global.fileClient.s3.region=us-east-1" \
1111-
--set "global.fileClient.s3.accessKeyId=${MINIO_USER}" \
1112-
--set "global.fileClient.s3.prefix=${MINIO_BUCKET}" \
1113-
--set "global.fileClient.s3.usePathStyle=true" \
1114-
--set "global.fileClient.s3.autoCreateBucket=true" \
1115-
--set "processor.config.modelGateways.${MODEL_NAME}.url=${MODEL_URL}" \
1116-
--set "processor.config.modelGateways.${MODEL_NAME}.requestTimeout=5m" \
1117-
--set "processor.config.modelGateways.${MODEL_NAME}.maxRetries=3" \
1118-
--set "processor.config.modelGateways.${MODEL_NAME}.initialBackoff=1s" \
1119-
--set "processor.config.modelGateways.${MODEL_NAME}.maxBackoff=60s" \
1120-
--set "processor.config.modelGateways.${MODEL_NAME}.inferenceObjective=batch-sheddable" \
1121-
--set apiserver.tls.enabled=true \
1122-
--set apiserver.tls.certManager.enabled=true \
1123-
--set apiserver.tls.certManager.issuerName=selfsigned-issuer \
1124-
--set apiserver.tls.certManager.issuerKind=ClusterIssuer \
1125-
--set "apiserver.tls.certManager.dnsNames={batch-gateway-apiserver,batch-gateway-apiserver.${BATCH_NS}.svc.cluster.local,localhost}"
1126-
```
1127-
1128-
> - **`modelGateways.<model>.inferenceObjective`**: The `InferenceObjective` CRD name sent as the `x-gateway-inference-objective` header. EPP uses this to assign the request to the batch priority band (priority -1, sheddable). Without this, batch requests default to priority 0 and compete equally with interactive traffic.
1129-
> - **`modelGateways.<model>.url`**: The processor uses this URL to send inference requests. It points to the Internal Gateway's model endpoint (discovered from the Internal Gateway Service), not the external Gateway or the model server directly. The Internal Gateway enforces AuthPolicy (model access check) but not TokenRateLimitPolicy.
1130-
> - **`passThroughHeaders`**: Defaults to `[Authorization]`, so the processor forwards the end user's bearer token on inference calls without extra configuration. Override this only if you need a different set of headers.
1131-
>
1132-
> - **`apiserver.tls.certManager.*`**: Enables TLS for the batch API server using cert-manager. The `issuerName` must match a ClusterIssuer (e.g. `selfsigned-issuer`). The `dnsNames` should include the Service name and FQDN for TLS certificate generation. In this demo the DestinationRule (see 3.10) uses `insecureSkipVerify: true` because we use a self-signed certificate; in production, configure a trusted CA and set `insecureSkipVerify: false`.
1133-
> - **File storage**: This example uses S3-compatible storage (MinIO). To use a PVC instead, replace the `s3` options with:
1134-
> ```
1135-
> --set "global.fileClient.type=fs"
1136-
> --set "global.fileClient.fs.basePath=/tmp/batch-gateway"
1137-
> --set "global.fileClient.fs.pvcName=batch-gateway-files"
1138-
> ```
1139-
> and create a PVC with `ReadWriteMany` access mode. Note that `ReadWriteMany` requires a storage class that supports RWX (e.g. NFS, CephFS, EFS). Block storage (e.g. gp2, gp3) does not support RWX.
1140-
1141-
</details>
1142-
1143-
11441052
### 3.10 Configure HTTPRoute and Policies for Batch Gateway
11451053
11461054
Set the variable used throughout this section (re-set if starting a new shell):

docs/guides/kuadrant-integration.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -303,20 +303,6 @@ spec:
303303
- group: inference.networking.k8s.io
304304
kind: InferencePool
305305
name: free-model
306-
- matches:
307-
- path:
308-
type: PathPrefix
309-
value: /llm/free-model
310-
filters:
311-
- type: URLRewrite
312-
urlRewrite:
313-
path:
314-
type: ReplacePrefixMatch
315-
replacePrefixMatch: /
316-
backendRefs:
317-
- group: inference.networking.k8s.io
318-
kind: InferencePool
319-
name: free-model
320306
# gold-model
321307
- matches:
322308
- path:
@@ -346,20 +332,6 @@ spec:
346332
- group: inference.networking.k8s.io
347333
kind: InferencePool
348334
name: gold-model
349-
- matches:
350-
- path:
351-
type: PathPrefix
352-
value: /llm/gold-model
353-
filters:
354-
- type: URLRewrite
355-
urlRewrite:
356-
path:
357-
type: ReplacePrefixMatch
358-
replacePrefixMatch: /
359-
backendRefs:
360-
- group: inference.networking.k8s.io
361-
kind: InferencePool
362-
name: gold-model
363335
EOF
364336
```
365337

0 commit comments

Comments
 (0)