Skip to content

fix(zrpc): aggregate kube resolver addresses by EndpointSlice#5659

Open
artisth wants to merge 3 commits into
zeromicro:masterfrom
artisth:fix-kube-resolver-endpointslice-aggregation
Open

fix(zrpc): aggregate kube resolver addresses by EndpointSlice#5659
artisth wants to merge 3 commits into
zeromicro:masterfrom
artisth:fix-kube-resolver-endpointslice-aggregation

Conversation

@artisth

@artisth artisth commented Jun 23, 2026

Copy link
Copy Markdown

What is changed

This PR changes the zRPC Kubernetes resolver to keep endpoint addresses per EndpointSlice and aggregate all slices before updating gRPC resolver state.

Previously, every EndpointSlice update replaced the global endpoint address set with only the addresses from the updated slice. If one slice was updated to an empty endpoint list while other slices still had ready endpoints, the resolver could publish an empty address list and gRPC would report produced zero addresses.

The new implementation:

  • tracks addresses by EndpointSlice identity
  • aggregates addresses across all tracked slices on update
  • removes only the deleted slice on delete events
  • supports delete tombstones from the informer cache

Why

Kubernetes services can have multiple EndpointSlice objects. A single EndpointSlice update should not discard addresses from other slices.

Tests

  • go test ./zrpc/resolver/internal/kube ./zrpc/resolver/internal
  • go test ./zrpc/...

@artisth artisth force-pushed the fix-kube-resolver-endpointslice-aggregation branch from 3f0ace5 to 393a62f Compare June 23, 2026 11:13
@artisth artisth closed this Jun 23, 2026
@artisth artisth force-pushed the fix-kube-resolver-endpointslice-aggregation branch from 393a62f to 48ca7f0 Compare June 23, 2026 11:15
@artisth artisth reopened this Jun 23, 2026
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.

1 participant