Revolyssup commented on issue #1818: URL: https://github.com/apache/apisix-ingress-controller/issues/1818#issuecomment-1536547720
Similar to how we use the service name passed by annotations to override the namespace of the ingress [here](https://github.com/apache/apisix-ingress-controller/blob/31891bac85f02bc3487069af47a22ad403a863e5/pkg/providers/ingress/translation/translator.go#L159). We can add another field in the [Backend](https://github.com/apache/apisix-ingress-controller/blob/31891bac85f02bc3487069af47a22ad403a863e5/pkg/kube/apisix/apis/config/v2/types.go#L82) struct `serviceNamespace` which when specified will override the namespace of ApisixRoute [here](https://github.com/apache/apisix-ingress-controller/blob/31891bac85f02bc3487069af47a22ad403a863e5/pkg/providers/apisix/translation/apisix_route.go#L99). Something like: --- ns:= ar.Namespace if backend.ServiceNamespace!=""{ ns = backend.ServiceNamespace } svcClusterIP, svcPort, err := t.GetServiceClusterIPAndPort(&backend, ns) --- What do you think @tao12345666333 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
