@@ -47,10 +47,11 @@ const (
4747var _ = g .Describe ("[sig-network-edge][OCPFeatureGate:GatewayAPIController][Feature:Router][apigroup:gateway.networking.k8s.io]" , g .Ordered , g .Serial , func () {
4848 defer g .GinkgoRecover ()
4949 var (
50- oc = exutil .NewCLIWithPodSecurityLevel ("gatewayapi-controller" , admissionapi .LevelBaseline )
51- csvName string
52- err error
53- gateways []string
50+ oc = exutil .NewCLIWithPodSecurityLevel ("gatewayapi-controller" , admissionapi .LevelBaseline )
51+ csvName string
52+ err error
53+ gateways []string
54+ infPoolCRD = "https://raw.githubusercontent.com/kubernetes-sigs/gateway-api-inference-extension/main/config/crd/bases/inference.networking.k8s.io_inferencepools.yaml"
5455 )
5556
5657 const (
@@ -246,6 +247,28 @@ var _ = g.Describe("[sig-network-edge][OCPFeatureGate:GatewayAPIController][Feat
246247 g .By ("Validating the http connectivity to the backend application" )
247248 assertHttpRouteConnection (defaultRoutename )
248249 })
250+
251+ g .It ("Ensure GIE is enabled after creating an inferencePool CRD" , func () {
252+ errCheck := checkGatewayClass (oc , gatewayClassName )
253+ o .Expect (errCheck ).NotTo (o .HaveOccurred (), "GatewayClass %q was not installed and accepted" , gatewayClassName )
254+
255+ g .By ("Install the GIE CRD" )
256+ err := oc .AsAdmin ().Run ("create" ).Args ("-f" , infPoolCRD ).Execute ()
257+ o .Expect (err ).NotTo (o .HaveOccurred ())
258+
259+ g .By ("Confirm istio is healthy and contains the env variable" )
260+ waitForIstioHealthy (oc )
261+ istioEnv , err := oc .AsAdmin ().Run ("get" ).Args ("-n" , "openshift-ingress" , "istio" , "openshift-gateway" , "-o=jsonpath={.spec.values.pilot.env}" ).Output ()
262+ o .Expect (err ).NotTo (o .HaveOccurred ())
263+ o .Expect (istioEnv ).To (o .ContainSubstring (`ENABLE_GATEWAY_API_INFERENCE_EXTENSION":"true` ))
264+
265+ g .By ("Uninstall the GIE CRD and confirm the env variable is removed" )
266+ err = oc .AsAdmin ().Run ("delete" ).Args ("-f" , infPoolCRD ).Execute ()
267+ o .Expect (err ).NotTo (o .HaveOccurred ())
268+ istioEnv , err = oc .AsAdmin ().Run ("get" ).Args ("-n" , "openshift-ingress" , "istio" , "openshift-gateway" , "-o=jsonpath={.spec.values.pilot.env}" ).Output ()
269+ o .Expect (err ).NotTo (o .HaveOccurred ())
270+ o .Expect (istioEnv ).NotTo (o .ContainSubstring (`ENABLE_GATEWAY_API_INFERENCE_EXTENSION":"true` ))
271+ })
249272})
250273
251274func skipGatewayIfNonCloudPlatform (oc * exutil.CLI ) {
0 commit comments