@@ -1609,14 +1609,10 @@ func (s *PublishingService) cleanupPublishedModelMetadata(namespace, modelName s
16091609}
16101610
16111611
1612- // createBackend creates a Backend resource that routes traffic to the istio-ingressgateway service .
1612+ // createBackend creates a Backend resource that routes traffic to the KServe VirtualService .
16131613//
1614- // The Backend resource uses:
1615- // - fqdn.hostname: The KServe model VirtualService hostname for proper Istio routing
1616- // - ip.address: The istio-ingressgateway service ClusterIP for direct traffic routing
1617- //
1618- // This configuration allows the AI Gateway to route to the KServe VirtualService
1619- // through the Istio ingress gateway, enabling proper service mesh integration.
1614+ // The Backend resource uses FQDN to point directly to the KServe model VirtualService hostname,
1615+ // allowing the AI Gateway to route through the Istio service mesh to reach the model endpoint.
16201616//
16211617// Parameters:
16221618// - namespace: The namespace of the tenant owning the model.
@@ -1627,15 +1623,8 @@ func (s *PublishingService) cleanupPublishedModelMetadata(namespace, modelName s
16271623// Returns:
16281624// - An error if the Backend resource creation fails.
16291625func (s * PublishingService ) createBackend (namespace , modelName , backendName , kserveHostname string ) error {
1630- // Get istio-ingressgateway service ClusterIP
1631- istioGatewayIP , err := s .getIstioIngressGatewayIP ()
1632- if err != nil {
1633- return fmt .Errorf ("failed to get istio-ingressgateway IP: %w" , err )
1634- }
1635-
1636- // Create Backend resource with dual endpoint configuration:
1626+ // Create Backend resource with FQDN endpoint configuration:
16371627 // - FQDN: KServe VirtualService hostname for proper Istio routing
1638- // - IP: istio-ingressgateway ClusterIP for direct traffic routing
16391628 backend := map [string ]interface {}{
16401629 "apiVersion" : "gateway.envoyproxy.io/v1alpha1" ,
16411630 "kind" : "Backend" ,
@@ -1656,10 +1645,6 @@ func (s *PublishingService) createBackend(namespace, modelName, backendName, kse
16561645 "hostname" : kserveHostname ,
16571646 "port" : 80 ,
16581647 },
1659- "ip" : map [string ]interface {}{
1660- "address" : istioGatewayIP ,
1661- "port" : 80 ,
1662- },
16631648 },
16641649 },
16651650 },
@@ -1668,29 +1653,14 @@ func (s *PublishingService) createBackend(namespace, modelName, backendName, kse
16681653 return s .k8sClient .CreateBackend ("envoy-gateway-system" , backend )
16691654}
16701655
1671- // getIstioIngressGatewayIP retrieves the ClusterIP of the istio-ingressgateway service
1672- func (s * PublishingService ) getIstioIngressGatewayIP () (string , error ) {
1673- service , err := s .k8sClient .GetService ("istio-system" , "istio-ingressgateway" )
1674- if err != nil {
1675- return "" , fmt .Errorf ("failed to get istio-ingressgateway service: %w" , err )
1676- }
1677-
1678- if service .Spec .ClusterIP == "" {
1679- return "" , fmt .Errorf ("istio-ingressgateway service has no ClusterIP" )
1680- }
1681-
1682- return service .Spec .ClusterIP , nil
1683- }
1684-
16851656// createAIServiceBackend creates an AIServiceBackend resource that references a Backend resource.
16861657//
16871658// The AIServiceBackend is a custom resource used to define AI service-specific configurations,
16881659// such as OpenAI schema and request timeouts, while delegating traffic routing to the referenced Backend.
1689- // The Backend resource contains both FQDN (KServe VirtualService hostname) and IP (istio-ingressgateway ClusterIP)
1690- // for proper routing through the Istio service mesh.
1660+ // The Backend resource contains FQDN (KServe VirtualService hostname) for routing through the Istio service mesh.
16911661//
16921662// Architecture:
1693- // Client -> AI Gateway -> AIServiceBackend -> Backend (FQDN: KServe VS, IP: istio-gateway ) -> Istio Gateway -> KServe Model
1663+ // Client -> AI Gateway -> AIServiceBackend -> Backend (FQDN: KServe VirtualService ) -> Istio Service Mesh -> KServe Model
16941664//
16951665// Parameters:
16961666// - namespace: The namespace of the tenant owning the model.
@@ -1702,7 +1672,7 @@ func (s *PublishingService) getIstioIngressGatewayIP() (string, error) {
17021672// - An error if the AIServiceBackend resource creation fails.
17031673func (s * PublishingService ) createAIServiceBackend (namespace , modelName , backendName , kserveHostname string ) error {
17041674 // Create AIServiceBackend resource that references the Backend for traffic routing
1705- // The Backend contains FQDN (KServe VirtualService) and IP (istio-ingressgateway) for proper routing
1675+ // The Backend contains FQDN (KServe VirtualService) for routing through Istio service mesh
17061676 aiServiceBackend := map [string ]interface {}{
17071677 "apiVersion" : "aigateway.envoyproxy.io/v1alpha1" ,
17081678 "kind" : "AIServiceBackend" ,
0 commit comments