Skip to content

Conversation

domgoodwin
Copy link
Contributor

We currently allowing setting topology aware routing (an annotation on services) to reduce cross AZ traffic, but this has lots of limitations and only works for deployments with lots of pods.

Instead lets allow the use of traffic distribution so we can configure service traffic to prefer (but fail back to not) traffic to stay with AZs - this means pods routing to the service of gateways will try and keep within AZ boundaries hopefully reducing cross AZ traffic.


if es.Spec.ServiceTrafficDistribution != "" {
trafficDistribution := es.Spec.ServiceTrafficDistribution
serviceSpec.TrafficDistribution = &trafficDistribution
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it would be helpful to add some validation here for when traffic distribution has an unsupported value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My worry would be if k8s supports extra values in the future we have to also update it here and the failure mode even if we errored here is the same as the operator failing to sync a service manifest (it won't update the svc and logs errors)

@domgoodwin domgoodwin merged commit dcad64f into master Jun 27, 2025
1 check passed
@domgoodwin domgoodwin deleted the egress-operator-configure-traffic-distribution branch June 27, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants