@@ -33,6 +33,7 @@ import (
33
33
"sigs.k8s.io/gateway-api-inference-extension/conformance/resources"
34
34
k8sutils "sigs.k8s.io/gateway-api-inference-extension/conformance/utils/kubernetes"
35
35
"sigs.k8s.io/gateway-api-inference-extension/conformance/utils/traffic"
36
+ "sigs.k8s.io/gateway-api-inference-extension/pkg/epp/metadata"
36
37
testfilter "sigs.k8s.io/gateway-api-inference-extension/pkg/epp/scheduling/framework/plugins/test/filter"
37
38
)
38
39
@@ -54,6 +55,7 @@ var GatewayFollowingEPPRouting = suite.ConformanceTest{
54
55
hostname = "primary.example.com"
55
56
path = "/primary-gateway-test"
56
57
appPodBackendPrefix = "primary-inference-model-server"
58
+ inferenceObjName = "conformance-fake-model-server"
57
59
)
58
60
59
61
httpRouteNN := types.NamespacedName {Name : "httproute-for-primary-gw" , Namespace : resources .AppBackendNamespace }
@@ -92,9 +94,12 @@ var GatewayFollowingEPPRouting = suite.ConformanceTest{
92
94
s .TimeoutConfig ,
93
95
gwAddr ,
94
96
traffic.Request {
95
- Host : hostname ,
96
- Path : path ,
97
- Headers : map [string ]string {testfilter .HeaderTestEppEndPointSelectionKey : podIPs [i ]},
97
+ Host : hostname ,
98
+ Path : path ,
99
+ Headers : map [string ]string {
100
+ testfilter .HeaderTestEppEndPointSelectionKey : podIPs [i ],
101
+ metadata .ObjectiveKey : inferenceObjName ,
102
+ },
98
103
Method : http .MethodPost ,
99
104
Body : requestBody ,
100
105
Backend : podNames [i ],
@@ -128,7 +133,10 @@ var GatewayFollowingEPPRouting = suite.ConformanceTest{
128
133
for _ , tc := range testCases {
129
134
t .Run (tc .name , func (t * testing.T ) {
130
135
eppHeaderValue := strings .Join (tc .podIPsToBeReturnedByEPP , "," )
131
- headers := map [string ]string {testfilter .HeaderTestEppEndPointSelectionKey : eppHeaderValue }
136
+ headers := map [string ]string {
137
+ testfilter .HeaderTestEppEndPointSelectionKey : eppHeaderValue ,
138
+ metadata .ObjectiveKey : inferenceObjName ,
139
+ }
132
140
133
141
t .Logf ("Sending request to %s with EPP header '%s: %s'" , gwAddr , testfilter .HeaderTestEppEndPointSelectionKey , eppHeaderValue )
134
142
t .Logf ("Expecting traffic to be routed to pod: %v" , tc .expectAllRequestsRoutedWithinPodNames )
0 commit comments