Allow setting service topology aware routing mode #41
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.
Add a way to configure service topology aware routing, this means we can have Kubernetes make traffic prefer to stay in the same AZ.
This is configured with an environment variable: setting
ENABLE_SERVICE_TOPOLOGY_MODE="true"
will mean services get the annotationservice.kubernetes.io/topology-mode=Auto
enabling the feature.I've also provided a way to opt out at the ExternalService level so some endpoints can opt themselves out.
The way topology aware routing works means if pods aren't split across zone topologies the endpoint will be as before.
Docs on topology aware routing: https://kubernetes.io/docs/concepts/services-networking/topology-aware-routing/