Skip to content

Commit 6464f12

Browse files
authored
test: Enable running the end to end tests on K8S clusters other than Kind (#453)
* Upgraded to latest GIE Signed-off-by: Shmuel Kallner <[email protected]> * Enable specification of full image name for E2E tests Signed-off-by: Shmuel Kallner <[email protected]> * Enable specification of namespace for E2E tests Signed-off-by: Shmuel Kallner <[email protected]> * Enable specification of local port for E2E tests Signed-off-by: Shmuel Kallner <[email protected]> * Enable specification of K8s context (cluster) for E2E tests Signed-off-by: Shmuel Kallner <[email protected]> * If running on an existing cluster, run kubectl port-forward Signed-off-by: Shmuel Kallner <[email protected]> * Fixed the base simulator image name Signed-off-by: Shmuel Kallner <[email protected]> * Corrected typo in env var name Signed-off-by: Shmuel Kallner <[email protected]> * Updated to new image name variables Signed-off-by: Shmuel Kallner <[email protected]> * Corrected Go version in builder Signed-off-by: Shmuel Kallner <[email protected]> * Use full image name in OpenShift deployment stuff Signed-off-by: Shmuel Kallner <[email protected]> * Full image names can now be specified for make env-dev-kind Signed-off-by: Shmuel Kallner <[email protected]> * Full image names can now be specified for make env-dev-kind Signed-off-by: Shmuel Kallner <[email protected]> * Updates to the latest GIE Signed-off-by: Shmuel Kallner <[email protected]> * Upgrade to GIE with FlowControl fix Signed-off-by: Shmuel Kallner <[email protected]> * Fixed lint error Signed-off-by: Shmuel Kallner <[email protected]> * Updated documentation Signed-off-by: Shmuel Kallner <[email protected]> --------- Signed-off-by: Shmuel Kallner <[email protected]>
1 parent b661e65 commit 6464f12

24 files changed

+231
-157
lines changed

Dockerfile.epp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Minimal runtime Dockerfile (microdnf-only, no torch, wrapper in site-packages)
2-
# Build Stage: using Go 1.25 image
3-
FROM quay.io/projectquay/golang:1.25 AS builder
2+
# Build Stage: using Go 1.24 image
3+
FROM quay.io/projectquay/golang:1.24 AS builder
44

55
ARG TARGETOS
66
ARG TARGETARCH

Makefile

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@ TARGETOS ?= $(shell go env GOOS)
88
TARGETARCH ?= $(shell go env GOARCH)
99
PROJECT_NAME ?= llm-d-inference-scheduler
1010
SIDECAR_IMAGE_NAME ?= llm-d-routing-sidecar
11+
VLLM_SIMULATOR_IMAGE_NAME ?= llm-d-inference-sim
1112
SIDECAR_NAME ?= pd-sidecar
1213
IMAGE_REGISTRY ?= ghcr.io/llm-d
1314
IMAGE_TAG_BASE ?= $(IMAGE_REGISTRY)/$(PROJECT_NAME)
1415
EPP_TAG ?= dev
1516
export EPP_TAG
16-
IMG = $(IMAGE_TAG_BASE):$(EPP_TAG)
17+
export EPP_IMAGE ?= $(IMAGE_TAG_BASE):$(EPP_TAG)
1718
SIDECAR_TAG ?= dev
1819
export SIDECAR_TAG
1920
SIDECAR_IMAGE_TAG_BASE ?= $(IMAGE_REGISTRY)/$(SIDECAR_IMAGE_NAME)
20-
SIDECAR_IMG = $(SIDECAR_IMAGE_TAG_BASE):$(SIDECAR_TAG)
21+
export SIDECAR_IMAGE ?= $(SIDECAR_IMAGE_TAG_BASE):$(SIDECAR_TAG)
2122
NAMESPACE ?= hc4ai-operator
2223
VLLM_SIMULATOR_TAG ?= v0.6.1
2324
export VLLM_SIMULATOR_TAG
25+
VLLM_SIMULATOR_TAG_BASE ?= $(IMAGE_REGISTRY)/$(VLLM_SIMULATOR_IMAGE_NAME)
26+
export VLLM_SIMULATOR_IMAGE ?= $(VLLM_SIMULATOR_TAG_BASE):$(VLLM_SIMULATOR_TAG)
2427

2528
# Map go arch to typos arch
2629
ifeq ($(TARGETARCH),amd64)
@@ -57,8 +60,8 @@ BUILD_REF ?= $(shell git describe --abbrev=0 2>/dev/null)
5760
SRC = $(shell find . -type f -name '*.go')
5861

5962
# Internal variables for generic targets
60-
epp_IMAGE = $(IMG)
61-
sidecar_IMAGE = $(SIDECAR_IMG)
63+
epp_IMAGE = $(EPP_IMAGE)
64+
sidecar_IMAGE = $(SIDECAR_IMAGE)
6265
epp_NAME = epp
6366
sidecar_NAME = $(SIDECAR_NAME)
6467
epp_LDFLAGS = -ldflags="$(LDFLAGS)"
@@ -185,7 +188,7 @@ uninstall: uninstall-docker ## Default uninstall using Docker
185188
.PHONY: install-docker
186189
install-docker: check-container-tool ## Install app using $(CONTAINER_RUNTIME)
187190
@echo "Starting container with $(CONTAINER_RUNTIME)..."
188-
$(CONTAINER_RUNTIME) run -d --name $(PROJECT_NAME)-container $(IMG)
191+
$(CONTAINER_RUNTIME) run -d --name $(PROJECT_NAME)-container $(EPP_IMAGE)
189192
@echo "$(CONTAINER_RUNTIME) installation complete."
190193
@echo "To use $(PROJECT_NAME), run:"
191194
@echo "alias $(PROJECT_NAME)='$(CONTAINER_RUNTIME) exec -it $(PROJECT_NAME)-container /app/$(PROJECT_NAME)'"
@@ -230,12 +233,12 @@ uninstall-k8s: check-kubectl check-kustomize check-envsubst ## Uninstall from Ku
230233

231234
.PHONY: install-openshift
232235
install-openshift: check-kubectl check-kustomize check-envsubst ## Install on OpenShift
233-
@echo $$PROJECT_NAME $$NAMESPACE $$IMAGE_TAG_BASE $$VERSION
236+
@echo $$PROJECT_NAME $$NAMESPACE $$EPP_IMAGE
234237
@echo "Creating namespace $(NAMESPACE)..."
235238
kubectl create namespace $(NAMESPACE) 2>/dev/null || true
236239
@echo "Deploying common resources from deploy/ ..."
237240
# Build and substitute the base manifests from deploy, then apply them
238-
kustomize build deploy/environments/openshift-base | envsubst '$$PROJECT_NAME $$NAMESPACE $$IMAGE_TAG_BASE $$VERSION' | kubectl apply -n $(NAMESPACE) -f -
241+
kustomize build deploy/environments/openshift-base | envsubst '$$PROJECT_NAME $$NAMESPACE $$EPP_IMAGE' | kubectl apply -n $(NAMESPACE) -f -
239242
@echo "Waiting for pod to become ready..."
240243
sleep 5
241244
@POD=$$(kubectl get pod -l app=$(PROJECT_NAME)-statefulset -n $(NAMESPACE) -o jsonpath='{.items[0].metadata.name}'); \
@@ -246,9 +249,9 @@ install-openshift: check-kubectl check-kustomize check-envsubst ## Install on Op
246249
.PHONY: uninstall-openshift
247250
uninstall-openshift: check-kubectl check-kustomize check-envsubst ## Uninstall from OpenShift
248251
@echo "Removing resources from OpenShift..."
249-
kustomize build deploy/environments/openshift-base | envsubst '$$PROJECT_NAME $$NAMESPACE $$IMAGE_TAG_BASE $$VERSION' | kubectl delete --force -f - || true
252+
kustomize build deploy/environments/openshift-base | envsubst '$$PROJECT_NAME $$NAMESPACE $$EPP_IMAGE' | kubectl delete --force -f - || true
250253
# @if kubectl api-resources --api-group=route.openshift.io | grep -q Route; then \
251-
# envsubst '$$PROJECT_NAME $$NAMESPACE $$IMAGE_TAG_BASE $$VERSION' < deploy/openshift/route.yaml | kubectl delete --force -f - || true; \
254+
# envsubst '$$PROJECT_NAME $$NAMESPACE $$EPP_IMAGE' < deploy/openshift/route.yaml | kubectl delete --force -f - || true; \
252255
# fi
253256
@POD=$$(kubectl get pod -l app=$(PROJECT_NAME)-statefulset -n $(NAMESPACE) -o jsonpath='{.items[0].metadata.name}'); \
254257
echo "Deleting pod: $$POD"; \
@@ -260,18 +263,18 @@ uninstall-openshift: check-kubectl check-kustomize check-envsubst ## Uninstall f
260263
.PHONY: install-rbac
261264
install-rbac: check-kubectl check-kustomize check-envsubst ## Install RBAC
262265
@echo "Applying RBAC configuration from deploy/rbac..."
263-
kustomize build deploy/environments/openshift-base/rbac | envsubst '$$PROJECT_NAME $$NAMESPACE $$IMAGE_TAG_BASE $$VERSION' | kubectl apply -f -
266+
kustomize build deploy/environments/openshift-base/rbac | envsubst '$$PROJECT_NAME' | kubectl apply -f -
264267

265268
.PHONY: uninstall-rbac
266269
uninstall-rbac: check-kubectl check-kustomize check-envsubst ## Uninstall RBAC
267270
@echo "Removing RBAC configuration from deploy/rbac..."
268-
kustomize build deploy/environments/openshift-base/rbac | envsubst '$$PROJECT_NAME $$NAMESPACE $$IMAGE_TAG_BASE $$VERSION' | kubectl delete -f - || true
271+
kustomize build deploy/environments/openshift-base/rbac | envsubst '$$PROJECT_NAME' | kubectl delete -f - || true
269272

270273
##@ Environment
271274
.PHONY: env
272275
env: ## Print environment variables
273276
@echo "IMAGE_TAG_BASE=$(IMAGE_TAG_BASE)"
274-
@echo "IMG=$(IMG)"
277+
@echo "EPP_IMAGE=$(EPP_IMAGE)"
275278
@echo "CONTAINER_RUNTIME=$(CONTAINER_RUNTIME)"
276279

277280
.PHONY: check-typos
@@ -390,7 +393,9 @@ env-dev-kind: ## Run under kind ($(KIND_CLUSTER_NAME))
390393
CLUSTER_NAME=$(KIND_CLUSTER_NAME) \
391394
GATEWAY_HOST_PORT=$(KIND_GATEWAY_HOST_PORT) \
392395
IMAGE_REGISTRY=$(IMAGE_REGISTRY) \
393-
EPP_TAG=$(EPP_TAG) \
396+
EPP_IMAGE=$(EPP_IMAGE) \
397+
VLLM_SIMULATOR_IMAGE=${VLLM_SIMULATOR_IMAGE} \
398+
SIDECAR_IMAGE=${SIDECAR_IMAGE} \
394399
./scripts/kind-dev-env.sh; \
395400
fi
396401

deploy/components/inference-gateway/deployments.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
terminationGracePeriodSeconds: 130
1919
containers:
2020
- name: epp
21-
image: ghcr.io/llm-d/llm-d-inference-scheduler:latest
21+
image: ${EPP_IMAGE}
2222
imagePullPolicy: IfNotPresent
2323
args:
2424
- --pool-name

deploy/components/inference-gateway/kustomization.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,3 @@ resources:
1818
- deployments.yaml
1919
- gateways.yaml
2020
- httproutes.yaml
21-
22-
images:
23-
- name: ghcr.io/llm-d/llm-d-inference-scheduler
24-
newTag: ${EPP_TAG}

deploy/components/vllm-sim-pd/deployments.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
spec:
1818
containers:
1919
- name: vllm
20-
image: ghcr.io/llm-d/llm-d-inference-sim:latest
20+
image: ${VLLM_SIMULATOR_IMAGE}
2121
imagePullPolicy: IfNotPresent
2222
args:
2323
- "--port=8000"
@@ -71,7 +71,7 @@ spec:
7171
spec:
7272
initContainers:
7373
- name: routing-sidecar
74-
image: ghcr.io/llm-d/llm-d-routing-sidecar:latest
74+
image: ${SIDECAR_IMAGE}
7575
imagePullPolicy: IfNotPresent
7676
args:
7777
- "--port=8000"
@@ -112,7 +112,7 @@ spec:
112112
fieldPath: status.podIP
113113
containers:
114114
- name: vllm
115-
image: ghcr.io/llm-d/llm-d-inference-sim:latest
115+
image: ${VLLM_SIMULATOR_IMAGE}
116116
imagePullPolicy: IfNotPresent
117117
args:
118118
- "--port=8200"

deploy/components/vllm-sim-pd/kustomization.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,3 @@ kind: Kustomization
1010

1111
resources:
1212
- deployments.yaml
13-
14-
images:
15-
- name: ghcr.io/llm-d/llm-d-inference-sim
16-
newTag: ${VLLM_SIMULATOR_TAG}
17-
- name: ghcr.io/llm-d/llm-d-routing-sidecar
18-
newTag: ${SIDECAR_TAG}

deploy/components/vllm-sim/deployments.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
spec:
1717
initContainers:
1818
- name: routing-sidecar
19-
image: ghcr.io/llm-d/llm-d-routing-sidecar:latest
19+
image: ${SIDECAR_IMAGE}
2020
imagePullPolicy: IfNotPresent
2121
args:
2222
- "--port=8000"
@@ -57,7 +57,7 @@ spec:
5757
fieldPath: status.podIP
5858
containers:
5959
- name: vllm
60-
image: ghcr.io/llm-d/llm-d-inference-sim:latest
60+
image: ${VLLM_SIMULATOR_IMAGE}
6161
imagePullPolicy: IfNotPresent
6262
args:
6363
- "--port=8200"

deploy/components/vllm-sim/kustomization.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,3 @@ kind: Kustomization
1111
resources:
1212
- deployments.yaml
1313

14-
images:
15-
- name: ghcr.io/llm-d/llm-d-inference-sim
16-
newTag: ${VLLM_SIMULATOR_TAG}
17-
- name: ghcr.io/llm-d/llm-d-routing-sidecar
18-
newTag: ${SIDECAR_TAG}
19-

deploy/environments/openshift-base/common/patch-statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ spec:
1616
serviceAccountName: operator-controller-manager
1717
containers:
1818
- name: cmd
19-
image: ${IMAGE_TAG_BASE}:${VERSION}
19+
image: ${EPP_IMAGE}
2020
imagePullPolicy: Always

deploy/environments/openshift-base/kustomization.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ configMapGenerator:
2626
# Define the image to be updated.
2727
# images:
2828
# - name: ghcr.io/llm-d/placeholder
29-
# newName: ghcr.io/llm-d/${IMAGE_TAG_BASE}
30-
# newTag: ${VERSION}
29+
# newName: ${EPP_IMAGE}
3130
patches:
3231
- path: common/patch-service.yaml
3332
- path: common/patch-statefulset.yaml

0 commit comments

Comments
 (0)