Skip to content

Commit 7a75ce9

Browse files
kishorjTimothy-Dougherty
authored andcommitted
resolve VPC CIDRs for UDP protocol (kubernetes-sigs#2008)
1 parent ce0a825 commit 7a75ce9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/service/model_build_target_group.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ func (t *defaultModelBuildTask) buildTargetGroupBindingSpec(ctx context.Context,
369369
targetPort = intstr.FromInt(int(port.NodePort))
370370
}
371371
defaultSourceRanges := []string{"0.0.0.0/0"}
372-
if preserveClientIP && scheme == elbv2model.LoadBalancerSchemeInternal {
372+
if (port.Protocol == corev1.ProtocolUDP || preserveClientIP) && scheme == elbv2model.LoadBalancerSchemeInternal {
373373
defaultSourceRanges, err = t.vpcResolver.ResolveCIDRs(ctx)
374374
if err != nil {
375375
return elbv2model.TargetGroupBindingResourceSpec{}, err

0 commit comments

Comments
 (0)