-
Notifications
You must be signed in to change notification settings - Fork 71
[Bug fix] Revive serviceReconciler.reconcileTargetsResource() to handle k8sService deletion de-registering targets #387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug fix] Revive serviceReconciler.reconcileTargetsResource() to handle k8sService deletion de-registering targets #387
Conversation
…sService deletion
solmonk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also check manually that target de-registration is happening?
Already did the manual test, single step debug to trace the build_model and synthesizer de-registering targets |
- Add reconcileTargetsResource error handling logic
solmonk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Please make sure the e2e test cover this scenario! So that we will |
liwenwu-amazon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need finalizer. Otherwise, the service delete event can be lost.
finalizer added at line 126, please check the controllers/service_controller.go deregister_targets_test.go e2etest covered these use cases |
| // verifyNoTargetsForTargetGroup(targetGroup) | ||
| //}) | ||
|
|
||
| It("Kubernetes Deployment deletion triggers targets de-registering", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do u delete this particular case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test case is still there at line71 https://github.com/aws/aws-application-networking-k8s/pull/387/files#diff-5d3817ed5a0b35b8fd4bd339f69b3b19b3b007739c3b25e938e976d2e5fefb9dR71
…8sService deletion
What type of PR is this?
Which issue does this PR fix: bug fix for #331
It's quite possible that this previous refactoring service_controller.go, cause a regression that "deleting k8sService do NOT de-registering targets". Bring back the
(r *serviceReconciler) reconcileTargetsResource()logic to handle the k8sService deletion could fix this issueWhat does this PR do / Why do we need it: bug fix for #331
If an issue # is not available please add repro steps and logs from aws-gateway-controller showing the issue:
Testing done on this change:
Automation added to e2e:
newly un-commented e2etest case pass, all test cases pass
E2E tests for new revision also pass
Will this PR introduce any new dependencies?:
Will this break upgrades or downgrades. Has updating a running cluster been tested?:
Does this PR introduce any user-facing change?:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.