Skip to content

Commit

Permalink
Adding destination to retry
Browse files Browse the repository at this point in the history
  • Loading branch information
cmendesce committed Jun 18, 2024
1 parent 28426dd commit 5bc2de7
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ private void configureRetryOnSource(String namespace, Source source, Target targ
var sourceVirtualService = findVirtualService(namespace, source.getServiceName());
var retryPolicy = createRetryPolicy(source.getPatternConfig(), target);
if (retryPolicy.isPresent()) {
Destination destination = new DestinationBuilder()
.withHost(target.getServiceName())
.withSubset("v1")
.build();
var destination = new DestinationBuilder().withHost(target.getServiceName()).build();

HTTPRoute httpRoute = new HTTPRouteBuilder()
var httpRoute = new HTTPRouteBuilder()
.withRoute(Collections.singletonList(new HTTPRouteDestinationBuilder()
.withDestination(destination)
.build()))
Expand All @@ -53,7 +50,7 @@ private void configureRetryOnSource(String namespace, Source source, Target targ
var newVirtualService = sourceVirtualService
.edit()
.editSpec()
.withHttp(Collections.singletonList(httpRoute))
.withHttp(httpRoute)
.endSpec()
.build();

Expand Down

0 comments on commit 5bc2de7

Please sign in to comment.