βœ… No Immediate Action Required
No immediate action required. Review updates to better support your users, especially if using headless services with multiple IPs in a multicluster setup.


πŸ“ Summary

Istio 1.27.5 delivers a crucial bug fix, significantly improving DNS resolution for headless services. This update addresses an issue where pods with multiple IP addresses in headless service configurations, especially across multicluster setups, were not always correctly represented in the DNS name table. Now, Istio ensures all relevant IP addresses are correctly aggregated and prioritized for local clusters, providing more reliable service discovery. This means your applications will experience more robust connectivity to headless services. Additionally, this release includes important dependency bumps for core components like proxy, ztunnel, istio.io/api, and istio.io/client-go, along with updated build tools. These maintenance updates ensure stability, performance, and compatibility within the Istio ecosystem. Review these changes to understand their impact on your deployments.


πŸ› Headless Services: Corrected DNS Resolution for Multi-IP Pods

Istio 1.27.5 brings an important correction to how DNS resolution is handled for headless services, specifically when pods associated with these services possess multiple IP addresses. Previously, in certain scenarios, particularly within multicluster environments, the DNS name table might have omitted some IP addresses or incorrectly prioritized remote cluster IPs over local ones. This fix ensures that Istio’s DNS server accurately aggregates and prioritizes all IP addresses for headless service entries, guaranteeing reliable and consistent service discovery for your applications.

The core of this fix lies in the pkg/dns/server/name_table.go file. The previous logic had potential pitfalls where, for model.Passthrough (headless) services, an existing entry in the out.Table might prevent a more appropriate local cluster IP from being recorded, or it might not accumulate all IP addresses from instances. The updated implementation now employs dedicated maps (localAddresses, remoteAddresses, and hostMetadata) to meticulously collect all IP addresses for each host. It iterates through service instances, populating these maps by appending all relevant IP addresses. Critically, it then writes entries from localAddresses to the main out.Table first, followed by remoteAddresses entries only if no local entry already exists for that host. This systematic approach ensures that all associated IP addresses are present, and local cluster IPs are correctly preferred in a multicluster context.

// ... inside BuildNameTable function ...

if svc.Resolution == model.Passthrough && len(svc.Ports) > 0 {
    localAddresses := make(map[string][]string)
    remoteAddresses := make(map[string][]string)
    hostMetadata := make(map[string]types.NamespacedName)
    for _, instance := range cfg.Push.ServiceEndpointsByPort(svc, svc.Ports[0].Port, nil) {
        // ... logic to determine host, shortName, and sameCluster ...

        hostMetadata[host] = types.NamespacedName{Name: shortName, Namespace: svc.Attributes.Namespace}
        if sameCluster {
            localAddresses[host] = append(localAddresses[host], instance.Addresses...)
        } else {
            remoteAddresses[host] = append(remoteAddresses[host], instance.Addresses...)
        }
    }

    // Write local cluster entries first
    for host, ips := range localAddresses {
        meta := hostMetadata[host]
        out.Table[host] = &dnsProto.NameTable_NameInfo{
            Ips:       ips,
            Registry:  string(svc.Attributes.ServiceRegistry),
            Namespace: meta.Namespace,
            Shortname: meta.Name,
        }
    }
    // Write remote cluster entries only if local doesn't exist
    for host, ips := range remoteAddresses {
        if _, exists := localAddresses[host]; !exists {
            meta := hostMetadata[host]
            out.Table[host] = &dnsProto.NameTable_NameInfo{
                Ips:       ips,
                Registry:  string(svc.Attributes.ServiceRegistry),
                Namespace: meta.Namespace,
                Shortname: meta.Name,
            }
        }
    }
}
// ... rest of the function ...

Source:

  • pkg/dns/server/name_table.go (62-132)
  • pkg/dns/server/name_table_test.go (695-802)

Minor Updates & Housekeeping

This release includes routine dependency updates, bumping the proxy and ztunnel components to their latest release-1.27 SHAs. Additionally, istio.io/api and istio.io/client-go dependencies have been updated from v1.27.2 to v1.27.4, and the development container’s build-tools image has been refreshed, ensuring a more stable and current development environment.