-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Implement the service endpoints controller #17216
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkeeler
force-pushed
the
catalog-v2/workload-health-controller
branch
from
May 3, 2023 21:10
509271c
to
300b669
Compare
mkeeler
force-pushed
the
catalog-v2/service-endpoints-controller
branch
from
May 3, 2023 21:15
9b31ba2
to
fafa53f
Compare
boxofrad
reviewed
May 5, 2023
mkeeler
force-pushed
the
catalog-v2/workload-health-controller
branch
2 times, most recently
from
May 8, 2023 17:41
95ae401
to
73b732c
Compare
mkeeler
force-pushed
the
catalog-v2/service-endpoints-controller
branch
from
May 8, 2023 17:44
fafa53f
to
0c04e93
Compare
mkeeler
force-pushed
the
catalog-v2/workload-health-controller
branch
14 times, most recently
from
May 12, 2023 13:26
6517df1
to
a465a8c
Compare
analogue
reviewed
May 12, 2023
internal/catalog/internal/controllers/endpoints/workload_mapper.go
Outdated
Show resolved
Hide resolved
mkeeler
force-pushed
the
catalog-v2/workload-health-controller
branch
2 times, most recently
from
May 15, 2023 13:55
7e5e873
to
5dc5051
Compare
mkeeler
force-pushed
the
catalog-v2/service-endpoints-controller
branch
from
May 15, 2023 13:58
0c04e93
to
f608a7f
Compare
mkeeler
force-pushed
the
catalog-v2/workload-health-controller
branch
from
May 15, 2023 16:24
5dc5051
to
de295b1
Compare
mkeeler
force-pushed
the
catalog-v2/service-endpoints-controller
branch
from
May 15, 2023 16:26
f608a7f
to
d8c7a49
Compare
mkeeler
force-pushed
the
catalog-v2/workload-health-controller
branch
from
May 19, 2023 17:36
de295b1
to
edb2b71
Compare
mkeeler
force-pushed
the
catalog-v2/service-endpoints-controller
branch
from
May 19, 2023 17:54
d8c7a49
to
874f2ce
Compare
mkeeler
added
pr/no-changelog
PR does not need a corresponding .changelog entry
pr/no-backport
labels
May 19, 2023
mkeeler
force-pushed
the
catalog-v2/service-endpoints-controller
branch
from
May 22, 2023 13:48
f23cbd8
to
995d3b7
Compare
ishustava
reviewed
May 23, 2023
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.
I'm still reviewing but thought I'd leave comments I had so far!
mkeeler
force-pushed
the
catalog-v2/service-endpoints-controller
branch
3 times, most recently
from
May 23, 2023 13:26
f1104b5
to
0c553de
Compare
ishustava
approved these changes
May 24, 2023
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.
Looks great! I had a few more comments, but won't block the merge on those.
mkeeler
force-pushed
the
catalog-v2/service-endpoints-controller
branch
from
May 24, 2023 17:38
0c553de
to
96d57f4
Compare
mkeeler
force-pushed
the
catalog-v2/service-endpoints-controller
branch
2 times, most recently
from
June 5, 2023 21:12
6210f47
to
ab8e1b8
Compare
This also fixes a bug where multiple service ports with a 0 value virtual port could not be set. A 0 virtual port means unset and so we should allow duplicates of these.
mkeeler
force-pushed
the
catalog-v2/service-endpoints-controller
branch
from
June 6, 2023 14:47
ab8e1b8
to
7f6fb90
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR builds on #17215. The workload mapper tracks which services each workload is a part of. When reconciling service endpoints, the controller will aggregate view all the status information of workloads in order to populate the HealthStatus field on the ServiceEndpoints. The final result is that the ServiceEndpoints types get computed for all services.
To make the workload to service mapping more efficient it uses a radix tree. I copied this from github.com/armon/go-radix and then modified that to be a generic type. Mainly I didn't want to type coerce from interface{} all over the place. This could probably also have used a generic version of github.com/hashicorp/go-immutable-radix.S
Testing & Reproduction steps
PR Checklist