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
Catalog: Use EndpointSlice and propagate Kubernetes Topology information to synced consul service #3693
Conversation
5951693
to
a31b3b7
Compare
942f224
to
7c55d4e
Compare
@david-yu Similar end result yes, but that PR specifically targets NodePort services and uses underlying node labels. My change doesn't currently include pulling in region information as that's not directly available on EndpointSlice. |
My PR now includes region info for NodePort services as well so encompasses everything from the mentioned PR plus the addition of zone info for all other service types |
Thank you, I will try to have someone review sometime later next week. |
@david-yu took it further to include all service types now |
0ade05d
to
8b726a0
Compare
👋 @jukie thank you so much for this work! It looks great. I can see that the some of the unit tests in |
Yes these succeeded for me but I haven't re-tested after pulling in latest commits of main. Will doublecheck that in a few hours, thanks for taking a look! |
Found the problem. The nodes being referenced by the endpoints in the test also need to exist so we can grab region info. |
Updated somebroken helm chart tests andalso fixed logic in sync-catalog-clusterrole. TestSyncCatalogNamespaces and TestSyncCatalogNamespaces acceptance tests are currently failing. will try to take a look tomorrow. |
It passed. It was called with this below. basically packages are split into groupings to go on runners and then are used to set the PACKAGES envvar here. So, all packages will have their tests run this way.
|
@kolorful did you have a use case for region or would topology zone be good enough? |
@jukie does that make any difference? I don't have usecase region yet, but figured why not include region when adding az cause we might need it later on. |
Main difference is the zone information being available on the endpoints directly. It's probably not a big deal but was curious if there was any concern over the amount of extra api server calls to get each node. That already happens for NodePort type services so again, probably not a big deal to expand that to all service types. |
@jukie thanks for raising your scalability concerns about also grabbing node information while processing endpoint slices. I think we would want a way to turn that off via configuration/helm chart since we don't have load tests asserting its performance. I propose we remove that from this PR since there is no current requirement for Region and when it is needed we can add the appropriate helm configuration. SOund ok? This PR looks great. I think the two things needed to approve and merge are:
Thanks again for your efforts on this! |
… endpointslice map
Done. I've also taken another stab at dropping endpoints permission from the catalog cluster role because I really don't think we need it (all tests are passing for me without) but you can add that back in again if preferred. |
@jmurret could please kick off the acceptance tests again? |
@jukie I see, thanks for explaining. I think not having region info is fine, because usually it's part of the zone info anyway. |
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.
🚀 🙏 thank you @jukie for sticking with this and getting it done. We appreciate it!
Awesome! Will this automatically land on the -dev release for the image and helm charts? |
…ion to synced consul service (#3693) * Use EndpointSlice and propagate zone metadata to consul service * Fix tests * Add test for zone metadata * Cleanup and changelog entry * Fix clusterrole permissions and type on Informer * Include region info for NodePort services * Include topology region for all service types * Update release note * Fix tests * fix sync-catalog-clusterrole and tests * fix stash conflict * adding endpoints permission back to sync catalog since it still uses it. * Fix endpointslice map * Fix topology region * Remove region lookups, remove endpoints permissions, use pointers for endpointslice map * Drop region test --------- Co-authored-by: John Murret <john.murret@hashicorp.com>
…ion to synced consul service (#3693) * Use EndpointSlice and propagate zone metadata to consul service * Fix tests * Add test for zone metadata * Cleanup and changelog entry * Fix clusterrole permissions and type on Informer * Include region info for NodePort services * Include topology region for all service types * Update release note * Fix tests * fix sync-catalog-clusterrole and tests * fix stash conflict * adding endpoints permission back to sync catalog since it still uses it. * Fix endpointslice map * Fix topology region * Remove region lookups, remove endpoints permissions, use pointers for endpointslice map * Drop region test --------- Co-authored-by: John Murret <john.murret@hashicorp.com>
…ion to synced consul service (#3693) * Use EndpointSlice and propagate zone metadata to consul service * Fix tests * Add test for zone metadata * Cleanup and changelog entry * Fix clusterrole permissions and type on Informer * Include region info for NodePort services * Include topology region for all service types * Update release note * Fix tests * fix sync-catalog-clusterrole and tests * fix stash conflict * adding endpoints permission back to sync catalog since it still uses it. * Fix endpointslice map * Fix topology region * Remove region lookups, remove endpoints permissions, use pointers for endpointslice map * Drop region test --------- Co-authored-by: John Murret <john.murret@hashicorp.com>
@jukie there is no -dev channel/artifact for dev releases. you'll have to use the helm chart on main until the next 1.4 patch release. the values.yaml has a link to an internal dev preview that I think you should have access to: consul-k8s/charts/consul/values.yaml Line 69 in 5279204
|
…ogy information to synced consul service into release/1.4.x (#3782) * backport of commit b8e5ece * backport of commit ee26768 * backport of commit 4a3c209 * backport of commit c11b034 * backport of commit 093826a * backport of commit 75810ab * backport of commit f0f1762 * backport of commit 395c4fe * backport of commit 73ffbcb * backport of commit cc5d60c * backport of commit 0d8b7ae * backport of commit 5dcb453 * backport of commit 09506ba * Catalog: Use EndpointSlice and propagate Kubernetes Topology information to synced consul service (#3693) * Use EndpointSlice and propagate zone metadata to consul service * Fix tests * Add test for zone metadata * Cleanup and changelog entry * Fix clusterrole permissions and type on Informer * Include region info for NodePort services * Include topology region for all service types * Update release note * Fix tests * fix sync-catalog-clusterrole and tests * fix stash conflict * adding endpoints permission back to sync catalog since it still uses it. * Fix endpointslice map * Fix topology region * Remove region lookups, remove endpoints permissions, use pointers for endpointslice map * Drop region test --------- Co-authored-by: John Murret <john.murret@hashicorp.com> --------- Co-authored-by: jukie <10012479+Jukie@users.noreply.github.com> Co-authored-by: John Murret <john.murret@hashicorp.com>
…ogy information to synced consul service into release/1.2.x (#3780) * backport of commit b8e5ece * backport of commit ee26768 * backport of commit 4a3c209 * backport of commit c11b034 * backport of commit 093826a * backport of commit 75810ab * backport of commit f0f1762 * backport of commit 395c4fe * backport of commit 73ffbcb * backport of commit cc5d60c * backport of commit 0d8b7ae * backport of commit 5dcb453 * backport of commit 09506ba * Catalog: Use EndpointSlice and propagate Kubernetes Topology information to synced consul service (#3693) * Use EndpointSlice and propagate zone metadata to consul service * Fix tests * Add test for zone metadata * Cleanup and changelog entry * Fix clusterrole permissions and type on Informer * Include region info for NodePort services * Include topology region for all service types * Update release note * Fix tests * fix sync-catalog-clusterrole and tests * fix stash conflict * adding endpoints permission back to sync catalog since it still uses it. * Fix endpointslice map * Fix topology region * Remove region lookups, remove endpoints permissions, use pointers for endpointslice map * Drop region test --------- Co-authored-by: John Murret <john.murret@hashicorp.com> --------- Co-authored-by: jukie <10012479+Jukie@users.noreply.github.com> Co-authored-by: John Murret <john.murret@hashicorp.com>
…ogy information to synced consul service into release/1.3.x (#3781) * backport of commit b8e5ece * backport of commit ee26768 * backport of commit 4a3c209 * backport of commit c11b034 * backport of commit 093826a * backport of commit 75810ab * backport of commit f0f1762 * backport of commit 395c4fe * backport of commit 73ffbcb * backport of commit cc5d60c * backport of commit 0d8b7ae * backport of commit 5dcb453 * backport of commit 09506ba * Catalog: Use EndpointSlice and propagate Kubernetes Topology information to synced consul service (#3693) * Use EndpointSlice and propagate zone metadata to consul service * Fix tests * Add test for zone metadata * Cleanup and changelog entry * Fix clusterrole permissions and type on Informer * Include region info for NodePort services * Include topology region for all service types * Update release note * Fix tests * fix sync-catalog-clusterrole and tests * fix stash conflict * adding endpoints permission back to sync catalog since it still uses it. * Fix endpointslice map * Fix topology region * Remove region lookups, remove endpoints permissions, use pointers for endpointslice map * Drop region test --------- Co-authored-by: John Murret <john.murret@hashicorp.com> --------- Co-authored-by: jukie <10012479+Jukie@users.noreply.github.com> Co-authored-by: John Murret <john.murret@hashicorp.com>
Changes proposed in this PR
How I've tested this PR
How I expect reviewers to test this PR
external-k8s-topology-zone
andexternal-k8s-topology-region
Checklist