Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
howardjohn committed Jun 21, 2024
1 parent 76ce3c1 commit cb7bb9f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pilot/pkg/serviceregistry/kube/controller/ambient/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,15 @@ func (a *index) constructService(svc *v1.Service, w *Waypoint) *workloadapi.Serv
Mode: workloadapi.LoadBalancing_STRICT,
}
}
ipPolicy := workloadapi.IPFamilies_AUTOMATIC
ipFamily := workloadapi.IPFamilies_AUTOMATIC
if len(svc.Spec.IPFamilies) == 2 {
ipPolicy = workloadapi.IPFamilies_DUAL
ipFamily = workloadapi.IPFamilies_DUAL
} else if len(svc.Spec.IPFamilies) == 1 {
family := svc.Spec.IPFamilies[0]
if family == v1.IPv4Protocol {
ipPolicy = workloadapi.IPFamilies_IPV4_ONLY
ipFamily = workloadapi.IPFamilies_IPV4_ONLY
} else {
ipPolicy = workloadapi.IPFamilies_IPV6_ONLY
ipFamily = workloadapi.IPFamilies_IPV6_ONLY
}
}
// TODO this is only checking one controller - we may be missing service vips for instances in another cluster
Expand All @@ -213,7 +213,7 @@ func (a *index) constructService(svc *v1.Service, w *Waypoint) *workloadapi.Serv
Ports: ports,
Waypoint: waypointAddress,
LoadBalancing: lb,
IpFamilies: ipPolicy,
IpFamilies: ipFamily,
}
}

Expand Down

0 comments on commit cb7bb9f

Please sign in to comment.