You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/24 01:32:18 UTC

[GitHub] [apisix-ingress-controller] hahayyum commented on a diff in pull request #1040: fix : The ingress backend is modified several times, resulting in residual update events

hahayyum commented on code in PR #1040:
URL: https://github.com/apache/apisix-ingress-controller/pull/1040#discussion_r879981530


##########
pkg/kube/translation/ingress.go:
##########
@@ -273,6 +281,29 @@ func (t *translator) translateIngressV1beta1(ing *networkingv1beta1.Ingress) (*T
 	return ctx, nil
 }
 
+func (t *translator) translateDefaultUpstreamFromIngressV1(namespace string, backend *networkingv1.IngressServiceBackend) *apisixv1.Upstream {
+	var portNumber int32
+	if backend.Port.Name != "" {
+		svc, err := t.ServiceLister.Services(namespace).Get(backend.Name)
+		if err != nil {
+			for _, port := range svc.Spec.Ports {

Review Comment:
   You're right. I missed this part of the test



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org