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

service topologies: Add service topology support to destination service #4502

Closed
mateiidavid opened this issue May 28, 2020 · 1 comment
Closed

Comments

@mateiidavid
Copy link
Member

Link to RFC

Problem Statement

Service Topology allows services to specify a topological preference as part of their spec . The preference is established based on an ordered list of labels called topologyKeys. Currently, the supported labels are:

  1. kubernetes.io/hostname ⇒ route traffic of the service to endpoints on the same node/host
  2. topology.kubernetes.io/zone ⇒ route traffic of the service to endpoints in the same zone
  3. topology.kubernetes.io/region ⇒ route traffic of the service to endpoints in the same region
  4. * ⇒ no preference

Nodes and EndpointSlices have the same labels with values set as part of their metadata. Based on the preference of the service and the origin of the traffic, a set of endpoints will be targeted. This particular issue focuses on adding support for the service labels in the endpoints_watcher part of the destination service.

Acceptance Criteria

  • Handler functions in endpoints_watcher.go that target services should now also collect topologyKeys from the service spec
  • servicePublisher struct which maps to a service in endpoints_watcher.go should now hold the additional topologyKeys labels in preference-order
  • If the service topology feature is not active in a cluster, or if a service does not have a topologyKey field, no data should be collected/retained by the service publisher
  • Unit tests should be added to the destination service to ensure topologyKeys are collected; the following files should include additional tests to ensure correct behaviour:
    1. ip_watcher_test.go
    2. endpoints_watcher_test.go
@mateiidavid
Copy link
Member Author

Closed by #4780

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants