Skip to content

Conversation

@jukie
Copy link
Contributor

@jukie jukie commented Jul 25, 2025

What type of PR is this?

feat: expose explicit configuration for Zone Aware Routing

What this PR does / why we need it:
This is the last PR related to splitting #6482 with the goal of exposing configuration for envoy localityLbConfig via BackendTrafficPolicy. Currently only ZoneAwareLbConfig is implemented but I'm planning on a followup to supported weightedLocalityLbConfig as well.
There's a lot of testdata changes here and I don't see a good way to split this up further without breaking e2e's but I've created draft PRs to try and make it easier to review.

Changes:

Which issue(s) this PR fixes:

Fixes #6025

Release Notes: Yes

Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>
@jukie jukie changed the title Track proxy servicecluster via xDS feat: Implement ZoneAware loadbalancing - Track Envoy pods via xDS (splitup #6482) Jul 25, 2025
jukie added 2 commits July 25, 2025 15:44
Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>
Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Jul 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.10%. Comparing base (f90e696) to head (5bc6890).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6597      +/-   ##
==========================================
+ Coverage   71.03%   71.10%   +0.07%     
==========================================
  Files         225      225              
  Lines       39155    39264     +109     
==========================================
+ Hits        27813    27918     +105     
- Misses       9732     9734       +2     
- Partials     1610     1612       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

jukie and others added 4 commits July 25, 2025 16:01
Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>
Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>
Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>
@jukie jukie force-pushed the track-proxy-instances-xds branch from a7d21dc to cad1754 Compare July 26, 2025 01:16
@jukie jukie marked this pull request as ready for review July 26, 2025 01:29
@jukie jukie requested a review from a team as a code owner July 26, 2025 01:29
@jukie jukie requested a review from a team July 26, 2025 01:29
Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>
@jukie
Copy link
Contributor Author

jukie commented Jul 26, 2025

/retest

@jukie jukie added this to the v1.5.0-rc.1 Release milestone Jul 26, 2025
@jukie
Copy link
Contributor Author

jukie commented Jul 26, 2025

/retest

@jukie
Copy link
Contributor Author

jukie commented Jul 27, 2025

/retest

1 similar comment
@jukie
Copy link
Contributor Author

jukie commented Jul 27, 2025

/retest

jukie and others added 2 commits July 27, 2025 22:07
Signed-off-by: Isaac <10012479+jukie@users.noreply.github.com>
Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>
@jukie
Copy link
Contributor Author

jukie commented Jul 28, 2025

/retest

jukie and others added 2 commits July 28, 2025 08:45
Signed-off-by: jukie <10012479+Jukie@users.noreply.github.com>
arkodg
arkodg previously approved these changes Jul 30, 2025
Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

LGTM thanks @jukie

would like to get this in, hope the remaining comments can be addressed post rc before v1.5.0

func (t *Translator) ProcessGlobalResources(resources *resource.Resources, xdsIRs resource.XdsIRMap) error {
func (t *Translator) ProcessGlobalResources(resources *resource.Resources, xdsIRs resource.XdsIRMap, gateways []*GatewayContext) error {
// Add the ProxyServiceCluster information for each gateway to the IR map
for _, gateway := range gateways {
Copy link
Contributor

Choose a reason for hiding this comment

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

this should ideally iterate over infraIR, right now we iterate through all gateways even for mergeGateways case, can be handled in a follow up

continue
}
match := true
for k, v := range labels {
Copy link
Member

Choose a reason for hiding this comment

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

non-blocking, we can reuse somehting like

func isSelectorMatch(labelselector *metav1.LabelSelector, l map[string]string) (bool, error) {
	selector, err := metav1.LabelSelectorAsSelector(labelselector)
	if err != nil {
		return false, fmt.Errorf("invalid label selector is generated: %w", err)
	}

	return selector.Matches(klabels.Set(l)), nil
}

@jukie
Copy link
Contributor Author

jukie commented Jul 30, 2025

/retest

@jukie
Copy link
Contributor Author

jukie commented Jul 30, 2025

I can followup with the rest of the changes before the full release

jukie and others added 2 commits July 29, 2025 22:07
accessLog:
json:
- path: /dev/stdout
globalResources:
Copy link
Member

Choose a reason for hiding this comment

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

we can fix this later

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that's expected here because the testdata input needs updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @zirain I saw #6678. Was I mistaken here?

Copy link
Member

Choose a reason for hiding this comment

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

why globalResources not present in GatewayNamesapceMode?

@arkodg arkodg requested a review from zirain July 30, 2025 05:05
@arkodg arkodg merged commit 288e713 into envoyproxy:main Jul 30, 2025
45 of 47 checks passed
@jukie jukie deleted the track-proxy-instances-xds branch July 30, 2025 21:57
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.

Explicit settings for Zone Aware Routing

3 participants