Skip to content

Commit 5d15136

Browse files
committed
e2e: add Istio service mesh integration testing profile
Implements E2E testing profile for Istio integration as per issue #656. Features: - Helm-based Istio installation (base, istiod, ingress gateway v1.28.0) - Automatic sidecar injection for Semantic Router pods - Istio Gateway and VirtualService configuration for traffic routing - DestinationRule with ISTIO_MUTUAL mTLS mode - 4 comprehensive Istio-specific test cases: * istio-sidecar-health-check: Validates sidecar injection * istio-traffic-routing: Tests routing through Istio gateway * istio-mtls-verification: Verifies mTLS configuration * istio-tracing-observability: Checks metrics and telemetry Integration: - Added 'istio' to CI workflow matrix for automated testing - Updated e2e/README.md with Istio profile documentation - Updated tools/make/e2e.mk help text Test Results (Local): - All 4 Istio tests passing (100% success rate) - Setup/teardown working correctly - Clean resource cleanup verified Resolves: #656 Signed-off-by: Semantic Router Bot <[email protected]> Signed-off-by: Asaad Balum <[email protected]>
1 parent bccdccf commit 5d15136

File tree

2 files changed

+45
-8
lines changed

2 files changed

+45
-8
lines changed

e2e/README.md

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -522,14 +522,21 @@ See `profiles/ai-gateway/` for a complete example.
522522

523523
### Istio Profile
524524

525-
The Istio profile tests Semantic Router deployment and functionality in an Istio service mesh environment.
525+
The Istio profile tests Semantic Router deployment and functionality in an Istio service mesh environment. It validates both Istio-specific features (sidecars, mTLS, tracing) and general Semantic Router functionality through Istio Gateway + VirtualService routing.
526526

527527
**What it Tests:**
528528

529-
- Istio sidecar injection and health
530-
- Traffic routing through Istio ingress gateway
531-
- Mutual TLS (mTLS) between services
532-
- Distributed tracing and observability
529+
- **Istio-Specific Features:**
530+
- Istio sidecar injection and health
531+
- Traffic routing through Istio ingress gateway
532+
- Mutual TLS (mTLS) between services
533+
- Distributed tracing and observability
534+
535+
- **Semantic Router Features (through Istio):**
536+
- Chat completions API and stress testing
537+
- Domain classification and routing
538+
- Semantic cache, PII detection, jailbreak detection
539+
- Signal-Decision engine (priority, plugins, keywords, fallback)
533540

534541
**Prerequisites:**
535542

@@ -553,13 +560,35 @@ The Istio profile tests Semantic Router deployment and functionality in an Istio
553560

554561
**Test Cases:**
555562

563+
**Istio-Specific Tests (4):**
564+
556565
| Test Case | Description | What it Validates |
557566
|-----------|-------------|-------------------|
558567
| `istio-sidecar-health-check` | Verify Envoy sidecar injection | - Istio-proxy container exists<br>- Sidecar is healthy and ready<br>- Namespace has `istio-injection=enabled` label |
559568
| `istio-traffic-routing` | Test routing through Istio gateway | - Gateway and VirtualService exist<br>- Requests route correctly to Semantic Router<br>- Istio/Envoy headers present in responses |
560569
| `istio-mtls-verification` | Verify mutual TLS configuration | - DestinationRule has `ISTIO_MUTUAL` mode<br>- mTLS certificates present in istio-proxy<br>- PeerAuthentication policy (if configured) |
561570
| `istio-tracing-observability` | Check distributed tracing and metrics | - Trace headers propagated<br>- Envoy metrics exposed<br>- Telemetry configuration<br>- Access logs enabled |
562571

572+
**Common Functionality Tests (reused from other profiles):**
573+
574+
These tests validate that Semantic Router features work correctly through Istio Gateway + VirtualService:
575+
576+
- `chat-completions-request` - Basic API functionality
577+
- `chat-completions-stress-request` - Sequential stress (1000 requests)
578+
- `domain-classify` - Classification accuracy (65 cases)
579+
- `semantic-cache` - Cache hit rate (5 groups)
580+
- `pii-detection` - PII detection and blocking (10 types)
581+
- `jailbreak-detection` - Attack detection (10 types)
582+
- `decision-priority-selection` - Priority-based routing (4 cases)
583+
- `plugin-chain-execution` - Plugin ordering (4 cases)
584+
- `rule-condition-logic` - AND/OR operators (6 cases)
585+
- `decision-fallback-behavior` - Fallback handling (5 cases)
586+
- `keyword-routing` - Keyword matching (6 cases)
587+
- `plugin-config-variations` - Config variations (6 cases)
588+
- `chat-completions-progressive-stress` - Progressive QPS stress test
589+
590+
**Total: 17 test cases** (4 Istio-specific + 13 common functionality)
591+
563592
**Usage:**
564593

565594
```bash
@@ -608,12 +637,20 @@ make e2e-test E2E_PROFILE=istio E2E_KEEP_CLUSTER=true
608637

609638
**Key Features Tested:**
610639

640+
**Istio Integration:**
611641
-**Automatic Sidecar Injection**: Istio automatically injects Envoy proxy sidecars into pods
612642
-**Traffic Management**: Requests route through Istio Gateway → VirtualService → Semantic Router
613643
-**Security (mTLS)**: Automatic mutual TLS encryption and authentication between services
614644
-**Observability**: Distributed tracing, metrics collection, and access logs
615645
-**Service Mesh Integration**: Semantic Router operates correctly within Istio mesh
616646

647+
**Semantic Router Functionality (through Istio):**
648+
-**LLM Gateway**: Chat completions API with stress testing
649+
-**Classification**: Domain-based routing with 65 test cases
650+
-**Security Features**: PII detection, jailbreak detection, semantic cache
651+
-**Signal-Decision Engine**: Priority-based routing, plugin chains, keyword matching, fallback behavior
652+
-**Load Handling**: Progressive stress testing (10-100 QPS)
653+
617654
**Setup Steps (Automated by Profile):**
618655

619656
1. Install Istio control plane using Helm (base, istiod, ingress gateway)

e2e/profiles/istio/profile.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ func (p *Profile) Teardown(ctx context.Context, opts *framework.TeardownOptions)
161161

162162
// GetTestCases returns the list of test cases for this profile
163163
func (p *Profile) GetTestCases() []string {
164-
// Istio profile focuses on Istio-specific functionality (issue #656)
165-
// These tests validate Istio integration: sidecar injection, traffic routing,
166-
// mTLS, and observability features
167164
return []string{
165+
// Istio-specific functionality tests
166+
// These validate Istio integration: sidecar injection, traffic routing,
167+
// mTLS, and observability features
168168
"istio-sidecar-health-check",
169169
"istio-traffic-routing",
170170
"istio-mtls-verification",

0 commit comments

Comments
 (0)