You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
kubernetes.io/hostname ⇒ route traffic of the service to endpoints on the same node/host
topology.kubernetes.io/zone ⇒ route traffic of the service to endpoints in the same zone
topology.kubernetes.io/region ⇒ route traffic of the service to endpoints in the same region
* ⇒ 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:
ip_watcher_test.go
endpoints_watcher_test.go
The text was updated successfully, but these errors were encountered:
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 calledtopologyKeys
. Currently, the supported labels are:kubernetes.io/hostname
⇒ route traffic of the service to endpoints on the same node/hosttopology.kubernetes.io/zone
⇒ route traffic of the service to endpoints in the same zonetopology.kubernetes.io/region
⇒ route traffic of the service to endpoints in the same region*
⇒ no preferenceNodes 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 theendpoints_watcher
part of the destination service.Acceptance Criteria
endpoints_watcher.go
that target services should now also collecttopologyKeys
from the servicespec
servicePublisher
struct which maps to a service inendpoints_watcher.go
should now hold the additionaltopologyKeys
labels in preference-orderservice topology
feature is not active in a cluster, or if a service does not have atopologyKey
field, no data should be collected/retained by theservice publisher
topologyKeys
are collected; the following files should include additional tests to ensure correct behaviour:ip_watcher_test.go
endpoints_watcher_test.go
The text was updated successfully, but these errors were encountered: