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 2021/06/21 14:14:02 UTC

[GitHub] [apisix-ingress-controller] tokers commented on a change in pull request #552: bug_fix: when the number of ep.Subsets changes from non-zero to zero, the sync logic will not run

tokers commented on a change in pull request #552:
URL: https://github.com/apache/apisix-ingress-controller/pull/552#discussion_r655414276



##########
File path: pkg/ingress/endpoint.go
##########
@@ -114,6 +114,21 @@ func (c *endpointsController) sync(ctx context.Context, ev *types.Event) error {
 		portMap[port.Name] = port.Port
 	}
 	clusters := c.controller.apisix.ListClusters()
+
+	//endpoints turn to zero
+	if len(ep.Subsets) == 0 {
+		nodes := []apisixv1.UpstreamNode{}

Review comment:
       We may still need to respect the ApisixUpstream subset settings, which means we need to traverse the ApisixUpstream subsets and reset the nodes to empty for all of them.




-- 
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.

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