Skip to content
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 3 commits into from
Jun 6, 2023

Conversation

mkeeler
Copy link
Member

@mkeeler mkeeler commented May 3, 2023

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

  • Unit tests

Testing & Reproduction steps

  • So far this has just involved manual testing by writing resources and observing the behavior.

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

@mkeeler mkeeler requested a review from ishustava May 3, 2023 13:52
@mkeeler mkeeler force-pushed the catalog-v2/workload-health-controller branch from 509271c to 300b669 Compare May 3, 2023 21:10
@mkeeler mkeeler force-pushed the catalog-v2/service-endpoints-controller branch from 9b31ba2 to fafa53f Compare May 3, 2023 21:15
@mkeeler mkeeler force-pushed the catalog-v2/workload-health-controller branch 2 times, most recently from 95ae401 to 73b732c Compare May 8, 2023 17:41
@mkeeler mkeeler force-pushed the catalog-v2/service-endpoints-controller branch from fafa53f to 0c04e93 Compare May 8, 2023 17:44
@mkeeler mkeeler force-pushed the catalog-v2/workload-health-controller branch 14 times, most recently from 6517df1 to a465a8c Compare May 12, 2023 13:26
@mkeeler mkeeler force-pushed the catalog-v2/workload-health-controller branch 2 times, most recently from 7e5e873 to 5dc5051 Compare May 15, 2023 13:55
@mkeeler mkeeler force-pushed the catalog-v2/service-endpoints-controller branch from 0c04e93 to f608a7f Compare May 15, 2023 13:58
@mkeeler mkeeler force-pushed the catalog-v2/workload-health-controller branch from 5dc5051 to de295b1 Compare May 15, 2023 16:24
@mkeeler mkeeler force-pushed the catalog-v2/service-endpoints-controller branch from f608a7f to d8c7a49 Compare May 15, 2023 16:26
@mkeeler mkeeler force-pushed the catalog-v2/workload-health-controller branch from de295b1 to edb2b71 Compare May 19, 2023 17:36
Base automatically changed from catalog-v2/workload-health-controller to main May 19, 2023 17:53
@mkeeler mkeeler force-pushed the catalog-v2/service-endpoints-controller branch from d8c7a49 to 874f2ce Compare May 19, 2023 17:54
@mkeeler mkeeler marked this pull request as ready for review May 19, 2023 17:57
@mkeeler mkeeler added pr/no-changelog PR does not need a corresponding .changelog entry pr/no-backport labels May 19, 2023
@mkeeler mkeeler force-pushed the catalog-v2/service-endpoints-controller branch from f23cbd8 to 995d3b7 Compare May 22, 2023 13:48
Copy link
Contributor

@ishustava ishustava left a 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 mkeeler force-pushed the catalog-v2/service-endpoints-controller branch 3 times, most recently from f1104b5 to 0c553de Compare May 23, 2023 13:26
Copy link
Contributor

@ishustava ishustava left a 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 mkeeler force-pushed the catalog-v2/service-endpoints-controller branch from 0c553de to 96d57f4 Compare May 24, 2023 17:38
@mkeeler mkeeler force-pushed the catalog-v2/service-endpoints-controller branch 2 times, most recently from 6210f47 to ab8e1b8 Compare June 5, 2023 21:12
mkeeler added 2 commits June 6, 2023 10:47
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 mkeeler force-pushed the catalog-v2/service-endpoints-controller branch from ab8e1b8 to 7f6fb90 Compare June 6, 2023 14:47
@mkeeler mkeeler merged commit a5ba889 into main Jun 6, 2023
@mkeeler mkeeler deleted the catalog-v2/service-endpoints-controller branch June 6, 2023 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-backport pr/no-changelog PR does not need a corresponding .changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants