Skip to content

Commit 2d94181

Browse files
committed
resolve comment
1 parent c6a450c commit 2d94181

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/provider/adc/translator/ingress.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,14 @@ func (t *Translator) TranslateIngress(tctx *provider.TranslateContext, obj *netw
127127
continue
128128
}
129129
if getService.Spec.Type == corev1.ServiceTypeExternalName {
130+
defaultServicePort := 80
131+
if servicePort > 0 {
132+
defaultServicePort = int(servicePort)
133+
}
130134
upstream.Nodes = adctypes.UpstreamNodes{
131135
{
132136
Host: getService.Spec.ExternalName,
133-
Port: int(servicePort),
137+
Port: defaultServicePort,
134138
Weight: 1,
135139
},
136140
}

0 commit comments

Comments
 (0)