cmd/k8s-operator: set PreferDualStack on ProxyGroup egress services (#19194)

On dual-stack clusters defaulting to IPv6, the ProxyGroup egress
service only got an IPv6 address, which causes request failures.
Individual egress proxies already set PreferDualStack correctly.

Fixes: #18768

Signed-off-by: Fernando Serboncini <fserb@tailscale.com>
This commit is contained in:
Fernando Serboncini 2026-04-09 13:33:39 -04:00 committed by GitHub
parent 27e6fed0c1
commit 6b7caaf7ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -457,7 +457,8 @@ func (esr *egressSvcsReconciler) clusterIPSvcForEgress(crl map[string]string) *c
Labels: crl,
},
Spec: corev1.ServiceSpec{
Type: corev1.ServiceTypeClusterIP,
Type: corev1.ServiceTypeClusterIP,
IPFamilyPolicy: new(corev1.IPFamilyPolicyPreferDualStack),
},
}
}

View File

@ -203,8 +203,9 @@ func clusterIPSvc(name string, extNSvc *corev1.Service) *corev1.Service {
Labels: labels,
},
Spec: corev1.ServiceSpec{
Type: corev1.ServiceTypeClusterIP,
Ports: ports,
Type: corev1.ServiceTypeClusterIP,
IPFamilyPolicy: new(corev1.IPFamilyPolicyPreferDualStack),
Ports: ports,
},
}
}