Do not attempt to create objects for URL ingresses as the ingress service will do so (#3491)

This commit is contained in:
Benjamin Pracht
2025-03-05 15:15:02 -08:00
committed by GitHub
parent f0edfbba8d
commit c3e06f0523
+13 -14
View File
@@ -190,20 +190,19 @@ func (s *IngressService) CreateIngressWithUrl(ctx context.Context, urlStr string
if err != nil { if err != nil {
return info, err return info, err
} }
} // The Ingress instance will create the ingress object when handling the URL pull ingress
} else {
// TODO Remove this store Ingress call for URL pull as it is redundant since _, err = s.io.CreateIngress(ctx, info)
// the ingress service sends a CreateIngress RPC switch err {
_, err = s.io.CreateIngress(ctx, info) case nil:
switch err { break
case nil: case ingress.ErrIngressOutOfDate:
break // Error returned if the ingress was already created by the ingress service
case ingress.ErrIngressOutOfDate: err = nil
// Error returned if the ingress was already created by the ingress service default:
err = nil logger.Errorw("could not create ingress object", err)
default: return nil, err
logger.Errorw("could not create ingress object", err) }
return nil, err
} }
return info, nil return info, nil