Skip to content

Commit 00902be

Browse files
authored
multi tenant patches and guards (#1049)
* multi tenant patches and guards Signed-off-by: Mohammed Abdi <mohammed.munir.abdi@ibm.com> * simplify by removing guardrails Signed-off-by: Mohammed Abdi <mohammed.munir.abdi@ibm.com> * update Signed-off-by: Mohammed Abdi <mohammed.munir.abdi@ibm.com> * simplify e2e Signed-off-by: Mohammed Abdi <mohammed.munir.abdi@ibm.com> * address review Signed-off-by: Mohammed Abdi <mohammed.munir.abdi@ibm.com> * fix ci Signed-off-by: Mohammed Abdi <mohammed.munir.abdi@ibm.com> --------- Signed-off-by: Mohammed Abdi <mohammed.munir.abdi@ibm.com>
1 parent aea61ad commit 00902be

9 files changed

Lines changed: 405 additions & 3 deletions

File tree

.github/workflows/ci-pr-checks.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ jobs:
324324
CREATE_CLUSTER: "true"
325325
INSTALL_GATEWAY_CTRLPLANE: "true"
326326
E2E_TESTS_ENABLED: "true"
327+
# Dual-controller smoke installs a second Helm release; chart path must be explicit in CI.
328+
WVA_E2E_CHART_PATH: ${{ github.workspace }}/charts/workload-variant-autoscaler
327329
IMG: ${{ steps.build-image.outputs.image }}
328330
SKIP_BUILD: "true"
329331
PROMETHEUS_ADAPTER_WAIT: "false"

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ SCALE_TO_ZERO_ENABLED ?= false
2525
SCALER_BACKEND ?= prometheus-adapter # prometheus-adapter (HPA), keda (ScaledObject), or none (skip, use pre-installed backend)
2626
E2E_MONITORING_NAMESPACE ?= workload-variant-autoscaler-monitoring
2727
E2E_EMULATED_LLMD_NAMESPACE ?= llm-d-sim
28+
E2E_WVA_CHART_PATH ?= $(CURDIR)/charts/workload-variant-autoscaler
2829
BENCHMARK_SCENARIO ?= prefill_heavy # Options: prefill_heavy (phase3a), decode_heavy (decode-heavy)
2930

3031
# Map scenario name to Ginkgo label filter
@@ -328,11 +329,12 @@ test-e2e-smoke: ## Run smoke e2e tests
328329
WVA_NAMESPACE=$(CONTROLLER_NAMESPACE) \
329330
LLMD_NAMESPACE=$(E2E_EMULATED_LLMD_NAMESPACE) \
330331
MONITORING_NAMESPACE=$(E2E_MONITORING_NAMESPACE) \
332+
WVA_E2E_CHART_PATH=$${WVA_E2E_CHART_PATH:-$(E2E_WVA_CHART_PATH)} \
331333
USE_SIMULATOR=$(USE_SIMULATOR) \
332334
SCALE_TO_ZERO_ENABLED=$(SCALE_TO_ZERO_ENABLED) \
333335
SCALER_BACKEND=$(SCALER_BACKEND) \
334336
MODEL_ID=$(MODEL_ID) \
335-
go test ./test/e2e/ -timeout 20m -v -ginkgo.v \
337+
go test ./test/e2e/ -timeout 35m -v -ginkgo.v \
336338
-ginkgo.label-filter="smoke" $(FOCUS_ARGS) $(SKIP_ARGS); \
337339
TEST_EXIT_CODE=$$?; \
338340
echo ""; \
@@ -350,6 +352,7 @@ test-e2e-full: ## Run full e2e test suite
350352
KUBECONFIG=$(KUBECONFIG) \
351353
ENVIRONMENT=$(ENVIRONMENT) \
352354
WVA_NAMESPACE=$(CONTROLLER_NAMESPACE) \
355+
WVA_E2E_CHART_PATH=$${WVA_E2E_CHART_PATH:-$(E2E_WVA_CHART_PATH)} \
353356
USE_SIMULATOR=$(USE_SIMULATOR) \
354357
SCALE_TO_ZERO_ENABLED=$(SCALE_TO_ZERO_ENABLED) \
355358
SCALER_BACKEND=$(SCALER_BACKEND) \

config/samples/hpa/hpa.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ spec:
3131
selector:
3232
matchLabels:
3333
variant_name: sample-deployment
34+
exported_namespace: llm-d-sim
3435
target:
3536
type: AverageValue
3637
averageValue: "1"

deploy/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,7 @@ spec:
586586
selector:
587587
matchLabels:
588588
variant_name: my-vllm-deployment-decode
589+
exported_namespace: $NAMESPACE
589590
target:
590591
type: AverageValue
591592
averageValue: "1"

docs/user-guide/hpa-integration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@ spec:
523523
selector:
524524
matchLabels:
525525
variant_name: sample-deployment
526+
exported_namespace: llm-d-sim
526527
target:
527528
type: AverageValue
528529
averageValue: "1"

docs/user-guide/multi-controller-isolation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ spec:
219219
selector:
220220
matchLabels:
221221
variant_name: "llama-8b"
222+
exported_namespace: "llm-d"
222223
controller_instance: "my-instance-id"
223224
```
224225

test/e2e/fixtures/hpa_builder.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ func buildHPA(namespace, name, deploymentName, vaName string, minReplicas, maxRe
114114
Metric: autoscalingv2.MetricIdentifier{
115115
Name: "wva_desired_replicas",
116116
Selector: &metav1.LabelSelector{
117-
MatchLabels: map[string]string{"variant_name": vaName},
117+
MatchLabels: map[string]string{
118+
"variant_name": vaName,
119+
"exported_namespace": namespace,
120+
},
118121
},
119122
},
120123
Target: autoscalingv2.MetricTarget{

test/e2e/smoke_test.go

Lines changed: 389 additions & 0 deletions
Large diffs are not rendered by default.

test/utils/e2eutils.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,8 @@ func CreateHPAOnDesiredReplicaMetrics(name, namespace, deploymentName, variantNa
944944
Name: constants.WVADesiredReplicas,
945945
Selector: &metav1.LabelSelector{
946946
MatchLabels: map[string]string{
947-
"variant_name": variantName,
947+
"variant_name": variantName,
948+
"exported_namespace": namespace,
948949
},
949950
},
950951
},

0 commit comments

Comments
 (0)