Skip to content

Commit 406aa57

Browse files
committed
resolve Copilot's comments
1 parent 68b721d commit 406aa57

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/provider/adc/translator/apisixroute.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ func (t *Translator) TranslateApisixRoute(tctx *provider.TranslateContext, ar *a
127127
continue
128128
}
129129
} else {
130-
upNodes, backendErr = t.translateApisixRouteBackendResolveGranularityEndpint(tctx, utils.NamespacedName(ar), backend)
130+
upNodes, backendErr = t.translateApisixRouteBackendResolveGranularityEndpoint(tctx, utils.NamespacedName(ar), backend)
131131
if backendErr != nil {
132-
t.Log.Error(backendErr, "failed to translate ApisixRoute backend with ResolveGranularity Service")
132+
t.Log.Error(backendErr, "failed to translate ApisixRoute backend with ResolveGranularity Endpoint")
133133
continue
134134
}
135135
}
@@ -178,7 +178,7 @@ func (t *Translator) translateApisixRouteBackendResolveGranularityService(tctx *
178178
return nil, errors.Errorf("service not found, ApisixRoute: %s, Service: %s", arNN, serviceNN)
179179
}
180180
if svc.Spec.ClusterIP == "" {
181-
return nil, errors.Errorf("conflict headless service and backend resolve granularity, Apisixroute: %s, Service: %s", arNN, serviceNN)
181+
return nil, errors.Errorf("conflict headless service and backend resolve granularity, ApisixRoute: %s, Service: %s", arNN, serviceNN)
182182
}
183183
return adc.UpstreamNodes{
184184
{
@@ -189,7 +189,7 @@ func (t *Translator) translateApisixRouteBackendResolveGranularityService(tctx *
189189
}, nil
190190
}
191191

192-
func (t *Translator) translateApisixRouteBackendResolveGranularityEndpint(tctx *provider.TranslateContext, arNN types.NamespacedName, backend apiv2.ApisixRouteHTTPBackend) (adc.UpstreamNodes, error) {
192+
func (t *Translator) translateApisixRouteBackendResolveGranularityEndpoint(tctx *provider.TranslateContext, arNN types.NamespacedName, backend apiv2.ApisixRouteHTTPBackend) (adc.UpstreamNodes, error) {
193193
weight := int32(*cmp.Or(backend.Weight, ptr.To(apiv2.DefaultWeight)))
194194
backendRef := gatewayv1.BackendRef{
195195
BackendObjectReference: gatewayv1.BackendObjectReference{

0 commit comments

Comments
 (0)