Skip to content

Commit 203ce4b

Browse files
committed
Refactors e2e for manifest approach
Signed-off-by: Daneyon Hansen <[email protected]>
1 parent 7902edb commit 203ce4b

17 files changed

+526
-1626
lines changed

api/v1alpha1/inferencemodel_types.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2121
)
2222

23-
const (
24-
// KindInferenceModel is the InferenceModel kind.
25-
KindInferenceModel = "InferenceModel"
26-
// ResourceInferenceModel is the name of the inferencemodels resource.
27-
ResourceInferenceModel = "inferencemodels"
28-
)
29-
3023
// InferenceModel is the Schema for the InferenceModels API.
3124
//
3225
// +kubebuilder:object:root=true

api/v1alpha1/inferencepool_types.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2121
)
2222

23-
const (
24-
// KindInferencePool is the InferencePool kind.
25-
KindInferencePool = "InferencePool"
26-
// ResourceInferencePool is the name of the inferencepools resource.
27-
ResourceInferencePool = "inferencepools"
28-
)
29-
3023
// InferencePool is the Schema for the InferencePools API.
3124
//
3225
// +kubebuilder:object:root=true

pkg/README.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,34 @@ This quickstart guide is intended for engineers familiar with k8s and model serv
44

55
### Requirements
66
- Envoy Gateway [v1.2.1](https://gateway.envoyproxy.io/docs/install/install-yaml/#install-with-yaml) or higher
7-
- A cluster that has built-in support for `ServiceType=LoadBalancer`. (This can be validated by ensuring your Envoy Gateway is up and running)
8-
- For example, with Kind, you can follow these steps: https://kind.sigs.k8s.io/docs/user/loadbalancer
7+
- A cluster that meets the following requirements:
8+
- Support for Services of type `LoadBalancer`. (This can be validated by ensuring your Envoy Gateway is up and running). For example, with Kind,
9+
you can follow [these steps](https://kind.sigs.k8s.io/docs/user/loadbalancer).
10+
- 3 GPUs to run the sample model server. Adjust the number of replicas in `./manifests/vllm/deployment.yaml` as needed.
911

1012
### Steps
1113

12-
1. **Deploy Sample vLLM Application**
14+
1. **Deploy Sample Model Server**
1315

14-
Create a Hugging Face secret to download the model [meta-llama/Llama-2-7b-hf](https://huggingface.co/meta-llama/Llama-2-7b-hf). Ensure that the token grants access to this model.
15-
Deploy a sample vLLM deployment with the proper protocol to work with the LLM Instance Gateway.
16+
Create a Hugging Face secret to download the [meta-llama/Llama-2-7b-hf](https://huggingface.co/meta-llama/Llama-2-7b-hf) model. Ensure that the token grants access to this model.
17+
18+
Replace `$HF_TOKEN` in `./manifests/vllm/deployment.yaml` with your Hugging Face secret and then deploy the model server.
1619
```bash
17-
kubectl create secret generic hf-token --from-literal=token=$HF_TOKEN # Your Hugging Face Token with access to Llama2
18-
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api-inference-extension/raw/main/pkg/manifests/vllm/vllm-lora-deployment.yaml
20+
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api-inference-extension/raw/main/pkg/manifests/vllm/deployment.yaml
1921
```
2022

21-
1. **Install the CRDs into the cluster:**
23+
1. **Install the Inference Extension CRDs:**
2224

2325
```sh
2426
kubectl apply -k https://github.com/kubernetes-sigs/gateway-api-inference-extension/config/crd
2527
```
2628

27-
1. **Deploy InferenceModel and InferencePool**
29+
1. **Deploy InferenceModel**
2830

29-
Deploy a sample InferenceModel and InferencePool configuration based on the vLLM deployments mentioned above.
31+
Deploy the sample InferenceModel which is configured to load balance traffic between the `tweet-summary-0` and `tweet-summary-1`
32+
[LoRA adapters](https://docs.vllm.ai/en/latest/features/lora.html) of the sample model server.
3033
```bash
31-
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api-inference-extension/raw/main/pkg/manifests/inferencepool-with-model.yaml
34+
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api-inference-extension/raw/main/pkg/manifests/inferencemodel.yaml
3235
```
3336

3437
1. **Update Envoy Gateway Config to enable Patch Policy**
@@ -46,11 +49,15 @@ This quickstart guide is intended for engineers familiar with k8s and model serv
4649
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api-inference-extension/raw/main/pkg/manifests/gateway/gateway.yaml
4750
```
4851
> **_NOTE:_** This file couples together the gateway infra and the HTTPRoute infra for a convenient, quick startup. Creating additional/different InferencePools on the same gateway will require an additional set of: `Backend`, `HTTPRoute`, the resources included in the `./manifests/gateway/ext-proc.yaml` file, and an additional `./manifests/gateway/patch_policy.yaml` file. ***Should you choose to experiment, familiarity with xDS and Envoy are very useful.***
49-
50-
5152
53+
Confirm that the Gateway was assigned an IP address and reports a `Programmed=True` status:
54+
```bash
55+
$ kubectl get gateway inference-gateway
56+
NAME CLASS ADDRESS PROGRAMMED AGE
57+
inference-gateway inference-gateway <MY_ADDRESS> True 22s
58+
```
5259

53-
1. **Deploy Ext-Proc**
60+
1. **Deploy the Inference Extension and InferencePool**
5461

5562
```bash
5663
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api-inference-extension/raw/main/pkg/manifests/ext_proc.yaml

pkg/crd/install.go

Lines changed: 0 additions & 106 deletions
This file was deleted.

pkg/crd/install_test.go

Lines changed: 0 additions & 130 deletions
This file was deleted.

0 commit comments

Comments
 (0)