@@ -30,6 +30,7 @@ import (
30
30
corev1 "k8s.io/api/core/v1"
31
31
rbacv1 "k8s.io/api/rbac/v1"
32
32
apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
33
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
33
34
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
34
35
"k8s.io/apimachinery/pkg/runtime"
35
36
"k8s.io/apimachinery/pkg/runtime/serializer"
@@ -56,8 +57,7 @@ const (
56
57
// defaultCurlInterval is the default interval to run the test curl command.
57
58
defaultCurlInterval = time .Second * 5
58
59
// nsName is the name of the Namespace used for tests.
59
- // TODO [danehans]: Must be "default" until https://github.com/kubernetes-sigs/gateway-api-inference-extension/issues/227 is fixed
60
- nsName = "default"
60
+ nsName = "inf-ext-e2e"
61
61
// modelServerName is the name of the model server test resources.
62
62
modelServerName = "vllm-llama3-8b-instruct"
63
63
// modelName is the test model name.
@@ -77,7 +77,7 @@ const (
77
77
// inferModelManifest is the manifest for the inference model CRD.
78
78
inferModelManifest = "../../../config/crd/bases/inference.networking.x-k8s.io_inferencemodels.yaml"
79
79
// inferExtManifest is the manifest for the inference extension test resources.
80
- inferExtManifest = "../../../config/manifests/ inferencepool-resources .yaml"
80
+ inferExtManifest = "../../testdata/ inferencepool-e2e .yaml"
81
81
// envoyManifest is the manifest for the envoy proxy test resources.
82
82
envoyManifest = "../../testdata/envoy.yaml"
83
83
// modelServerManifestFilepathEnvVar is the env var that holds absolute path to the manifest for the model server test resource.
@@ -118,6 +118,7 @@ func setupInfra() {
118
118
"inferencepools.inference.networking.x-k8s.io" : inferPoolManifest ,
119
119
"inferencemodels.inference.networking.x-k8s.io" : inferModelManifest ,
120
120
}
121
+ createNamespace (cli , nsName )
121
122
createCRDs (cli , crds )
122
123
createInferExt (cli , inferExtManifest )
123
124
createClient (cli , clientManifest )
@@ -182,6 +183,17 @@ var (
182
183
curlInterval = defaultCurlInterval
183
184
)
184
185
186
+ func createNamespace (k8sClient client.Client , ns string ) {
187
+ ginkgo .By ("Creating e2e namespace: " + ns )
188
+ obj := & corev1.Namespace {
189
+ ObjectMeta : v1.ObjectMeta {
190
+ Name : ns ,
191
+ },
192
+ }
193
+ err := k8sClient .Create (ctx , obj )
194
+ gomega .Expect (err ).NotTo (gomega .HaveOccurred (), "Failed to create e2e test namespace" )
195
+ }
196
+
185
197
// namespaceExists ensures that a specified namespace exists and is ready for use.
186
198
func namespaceExists (k8sClient client.Client , ns string ) {
187
199
ginkgo .By ("Ensuring namespace exists: " + ns )
0 commit comments