Gallardot commented on code in PR #1500:
URL:
https://github.com/apache/apisix-ingress-controller/pull/1500#discussion_r1047955792
##########
pkg/providers/apisix/translation/apisix_upstream.go:
##########
@@ -57,35 +55,24 @@ func (t *translator) translateService(namespace, svcName,
subset, svcResolveGran
return ups, nil
}
-// TODO: Support Port field
func (t *translator) TranslateApisixUpstreamExternalNodes(au
*v2.ApisixUpstream) ([]apisixv1.UpstreamNode, error) {
var nodes []apisixv1.UpstreamNode
for i, node := range au.Spec.ExternalNodes {
if node.Type == v2.ExternalTypeDomain {
- arr := strings.Split(node.Name, ":")
weight := translation.DefaultWeight
if node.Weight != nil {
weight = *node.Weight
}
n := apisixv1.UpstreamNode{
- Host: arr[0],
+ Host: node.Name,
Review Comment:
> I think we can use k8s's rule
@tao12345666333
agree. I've fixed it. PTAL.
--
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]