Revolyssup commented on code in PR #2553: URL: https://github.com/apache/apisix-ingress-controller/pull/2553#discussion_r2347363821
########## internal/adc/translator/apisixroute.go: ########## @@ -328,6 +329,26 @@ func (t *Translator) buildService(ar *apiv2.ApisixRoute, rule apiv2.ApisixRouteH return service } +func getPortFromService(svc *v1.Service, backendSvcPort intstr.IntOrString) (int32, error) { + var port int32 + if backendSvcPort.Type == intstr.Int { + port = int32(backendSvcPort.IntValue()) + } else { + found := false + for _, servicePort := range svc.Spec.Ports { + if servicePort.Name == backendSvcPort.StrVal { + port = servicePort.Port Review Comment: explained here - https://github.com/apache/apisix-ingress-controller/pull/2553/files#r2347360896 -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org