Skip to content

fix: create IPv4 Service with ipFamily IPv4 on dual-stack, IPv6-first cluster #6390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,10 @@ func (r *ResourceRender) Service() (*corev1.Service, error) {
// Set IP family policy and families based on proxy config request
ipFamily := r.infra.GetProxyConfig().Spec.IPFamily
if ipFamily != nil {
// SingleStack+IPv4 is default behavior from K8s and so is omitted
switch *ipFamily {
case egv1a1.IPv4:
serviceSpec.IPFamilies = []corev1.IPFamily{corev1.IPv4Protocol}
serviceSpec.IPFamilyPolicy = ptr.To(corev1.IPFamilyPolicySingleStack)
case egv1a1.IPv6:
serviceSpec.IPFamilies = []corev1.IPFamily{corev1.IPv6Protocol}
serviceSpec.IPFamilyPolicy = ptr.To(corev1.IPFamilyPolicySingleStack)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1864,8 +1864,8 @@ func TestIPFamilyPresentInSpec(t *testing.T) {
{
"ipv4 specified",
ptr.To(egv1a1.IPv4),
nil,
nil,
[]corev1.IPFamily{corev1.IPv4Protocol},
ptr.To(corev1.IPFamilyPolicySingleStack),
},
{
"ipv6 specified",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ metadata:
uid: test-owner-reference-uid-for-gatewayclass
spec:
externalTrafficPolicy: Local
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: EnvoyHTTPPort
port: 0
Expand Down
1 change: 1 addition & 0 deletions release-notes/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ bug fixes: |
Fixed bug in certificate SANs overlap detection in listeners.
Fixed issue where EnvoyExtensionPolicy ExtProc body processing mode is set to FullDuplexStreamed, but trailers were not sent.
Fixed validation issue where EnvoyExtensionPolicy ExtProc failOpen is true, and body processing mode FullDuplexStreamed is not rejected.
Fixed bug with IPv6, dual stack clusters and ipFamily IPV4 where the Service was IPv6.


# Enhancements that improve performance.
Expand Down