Skip to content

Commit 7e79990

Browse files
jland-redhatJaland
andauthored
feat: update gateway with consistent hostname (#146)
* Adding Hostname to default gateway * Addressing comment --------- Co-authored-by: Jamie Land <hokie10@gmail.com>
1 parent 6e851da commit 7e79990

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

deployment/README.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,26 @@ This guide provides instructions for deploying the MaaS Platform infrastructure
1414
- KServe components are expected to be provided by ODH/RHOAI, not installed separately
1515
- For non-ODH/RHOAI deployments, KServe can be optionally installed from `deployment/components/kserve`
1616

17+
> [!NOTE]
18+
> **Important:** For the KServe section of the ODH operator, you must set `defaultDeploymentMode: RawDeployment` and ensure that the serving management state is set to `Removed`.
19+
>
20+
> Example configuration:
21+
>
22+
> ```yaml
23+
> kserve:
24+
> nim:
25+
> managementState: Managed
26+
> rawDeploymentServiceConfig: Headless
27+
> serving:
28+
> ingressGateway:
29+
> certificate:
30+
> type: OpenshiftDefaultIngress
31+
> managementState: Removed
32+
> name: knative-serving
33+
> managementState: Managed
34+
> defaultDeploymentMode: RawDeployment
35+
> ```
36+
1737
## Quick Start
1838
1939
### Automated OpenShift Deployment (Recommended)
@@ -190,14 +210,10 @@ kubectl patch authpolicy maas-api-auth-policy -n maas-api \
190210
191211
### 1. Get Gateway Endpoint
192212
193-
For OpenShift:
194-
```bash
195-
HOST="$(kubectl get gateway maas-default-gateway -n openshift-ingress -o jsonpath='{.status.addresses[0].value}')"
196-
```
197213
198-
For Kubernetes with LoadBalancer:
199214
```bash
200-
HOST="$(kubectl get gateway maas-default-gateway -n openshift-ingress -o jsonpath='{.status.addresses[0].value}')"
215+
CLUSTER_DOMAIN=$(kubectl get ingresses.config.openshift.io cluster -o jsonpath='{.spec.domain}')
216+
HOST="maas-api.${CLUSTER_DOMAIN}"
201217
```
202218
203219
### 2. Get Authentication Token
@@ -224,8 +240,8 @@ MODELS=$(curl ${HOST}/maas-api/v1/models \
224240
-H "Authorization: Bearer $TOKEN" | jq . -r)
225241
226242
echo $MODELS | jq .
227-
MODEL_URL=$(echo $MODELS | jq -r '.data[0].url')
228243
MODEL_NAME=$(echo $MODELS | jq -r '.data[0].id')
244+
MODEL_URL=${HOST}/llm/${MODEL_NAME}/v1/chat/completions
229245
230246
echo $MODEL_URL
231247
```
@@ -244,7 +260,7 @@ curl -sSk -o /dev/null -w "%{http_code}\n" \
244260
\"prompt\": \"Not really understood prompt\",
245261
\"max_prompts\": 40
246262
}" \
247-
"${MODEL_URL}/v1/chat/completions";
263+
"${MODEL_URL}";
248264
done
249265
```
250266

deployment/base/networking/gateway-api.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ spec:
3636
gatewayClassName: openshift-default
3737
listeners:
3838
- name: http
39+
hostname: maas-api.${CLUSTER_DOMAIN}
3940
port: 80
4041
protocol: HTTP
4142
allowedRoutes:

0 commit comments

Comments
 (0)