support remove residual endpoints
What type of PR is this?
/kind enhancement
What this PR does / why we need it: The current code cannot process the following scenarios:
- The workload is used as the endpoint of service1 and service2.
- Later, the workload is removed from service2. In this case, the workload and service2 records in the endpoint are not deleted. As a result, subsequent service access requests are distributed to an incorrect endpoint.
Which issue(s) this PR fixes: Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Please add some description under what circumustance this can happen
Codecov Report
Attention: Patch coverage is 69.07216% with 60 lines in your changes missing coverage. Please review.
Project coverage is 52.28%. Comparing base (
bda21d4) to head (c544239). Report is 34 commits behind head on main.
| Files | Patch % | Lines |
|---|---|---|
| pkg/controller/workload/workload_processor.go | 62.01% | 39 Missing and 10 partials :warning: |
| pkg/controller/workload/cache/workload_cache.go | 82.81% | 8 Missing and 3 partials :warning: |
| Files | Coverage Δ | |
|---|---|---|
| pkg/bpf/bpf.go | 42.59% <ø> (+0.51%) |
:arrow_up: |
| pkg/controller/workload/bpfcache/fake_map.go | 83.33% <100.00%> (+0.35%) |
:arrow_up: |
| pkg/controller/workload/cache/workload_cache.go | 75.00% <82.81%> (+10.84%) |
:arrow_up: |
| pkg/controller/workload/workload_processor.go | 64.66% <62.01%> (+1.98%) |
:arrow_up: |
... and 5 files with indirect coverage changes
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 74ff6c8...c544239. Read the comment docs.
Adding label do-not-merge/contains-merge-commits because PR contains merge commits, which are not allowed in this repository.
Use git rebase to reapply your commits on top of the target branch. Detailed instructions for doing so can be found here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
@nlgwcy Please resolve conflicts
cc @hzxuzhonghu ready to be merged
Adding label do-not-merge/contains-merge-commits because PR contains merge commits, which are not allowed in this repository.
Use git rebase to reapply your commits on top of the target branch. Detailed instructions for doing so can be found here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/retest
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: hzxuzhonghu
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [hzxuzhonghu]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment