diff --git a/internal/cmd/egctl/translate.go b/internal/cmd/egctl/translate.go index b588d931fbad..62f06d41c868 100644 --- a/internal/cmd/egctl/translate.go +++ b/internal/cmd/egctl/translate.go @@ -276,7 +276,7 @@ func translateGatewayAPIToIR(resources *gatewayapi.Resources) (*gatewayapi.Trans } t := &gatewayapi.Translator{ - GatewayControllerName: resources.GatewayClass.Spec.ControllerName, + GatewayControllerName: string(resources.GatewayClass.Spec.ControllerName), GatewayClassName: gwapiv1.ObjectName(resources.GatewayClass.Name), GlobalRateLimitEnabled: true, EndpointRoutingDisabled: true, @@ -303,7 +303,7 @@ func translateGatewayAPIToGatewayAPI(resources *gatewayapi.Resources) (gatewayap // Translate from Gateway API to Xds IR gTranslator := &gatewayapi.Translator{ - GatewayControllerName: resources.GatewayClass.Spec.ControllerName, + GatewayControllerName: string(resources.GatewayClass.Spec.ControllerName), GatewayClassName: gwapiv1.ObjectName(resources.GatewayClass.Name), GlobalRateLimitEnabled: true, EndpointRoutingDisabled: true, @@ -335,7 +335,7 @@ func translateGatewayAPIToXds(dnsDomain string, resourceType string, resources * // Translate from Gateway API to Xds IR gTranslator := &gatewayapi.Translator{ - GatewayControllerName: resources.GatewayClass.Spec.ControllerName, + GatewayControllerName: string(resources.GatewayClass.Spec.ControllerName), GatewayClassName: gwapiv1.ObjectName(resources.GatewayClass.Name), GlobalRateLimitEnabled: true, EndpointRoutingDisabled: true, diff --git a/internal/gatewayapi/translator.go b/internal/gatewayapi/translator.go index ca90be5b6932..9dc93532479a 100644 --- a/internal/gatewayapi/translator.go +++ b/internal/gatewayapi/translator.go @@ -66,7 +66,7 @@ type TranslatorManager interface { // for Gateway API resources. type Translator struct { // GatewayControllerName is the name of the Gateway API controller - GatewayControllerName gwapiv1.GatewayController + GatewayControllerName string // GatewayClassName is the name of the GatewayClass // to process Gateways for.