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 09:56:30 UTC
[GitHub] [apisix-ingress-controller] flying1pig opened a new pull request #552: bug_fix: when the number of ep.Subsets changes from non-zero to zero, the sync logic will not run
flying1pig opened a new pull request #552:
URL: https://github.com/apache/apisix-ingress-controller/pull/552
Please answer these questions before submitting a pull request
- Why submit this pull request?
- [ ] Bugfix
- Related issues
https://github.com/apache/apisix-ingress-controller/issues/464
___
### Bugfix
- Description
when the number of ep.Subsets changes from non-zero to zero, the endpoint controller will not run into sync logic which sync changes from apisix-ingress-controller to apisix.
- How to fix?
if the length of ep.Subsets equals zero, sync empty apisixv1.UpstreamNode to apisix.
___
### New feature or improvement
- Describe the details and related test reports.
step1. make sure that the apisix-ingress-controller is working correctly with k8s and apisix cluster;
step2. chose a endpoint object which is listening by apisix-ingress-controller, change the related replicas from non-zero to zero;
step3. the apisix dashboard will not update the changes.
___
### Backport patches
- Why need to backport?
it's a bug in all of the history branch.
- Source branch
master
- Related commits and pull requests
no
- Target branch
all
--
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
[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
Posted by GitBox <gi...@apache.org>.
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
[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
Posted by GitBox <gi...@apache.org>.
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
[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #552: bug_fix: when the number of ep.Subsets changes from non-zero to zero, the sync logic will not run
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #552:
URL: https://github.com/apache/apisix-ingress-controller/pull/552#issuecomment-977845362
@flying1pig Can you resolve the conflict?
--
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
[GitHub] [apisix-ingress-controller] gxthrj commented on pull request #552: bug_fix: when the number of ep.Subsets changes from non-zero to zero, the sync logic will not run
Posted by GitBox <gi...@apache.org>.
gxthrj commented on pull request #552:
URL: https://github.com/apache/apisix-ingress-controller/pull/552#issuecomment-869394535
@flying1pig any update?
--
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
[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #552: bug_fix: when the number of ep.Subsets changes from non-zero to zero, the sync logic will not run
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #552:
URL: https://github.com/apache/apisix-ingress-controller/pull/552#issuecomment-892416484
@flying1pig friendly reminder
--
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