Skip to content

Commit

Permalink
Merge pull request #1937 from Tharsanan1/improve-backend-processing
Browse files Browse the repository at this point in the history
Improve backend processing logic
  • Loading branch information
Tharsanan1 authored Jan 8, 2024
2 parents c67f41c + 64c36e0 commit ccbcf15
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions adapter/internal/operator/controllers/dp/api_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -772,9 +772,11 @@ func (apiReconciler *APIReconciler) getResolvedBackendsMapping(ctx context.Conte
Name: string(backend.Name),
Namespace: utils.GetNamespace(backend.Namespace, httpRoute.Namespace),
}
resolvedBackend := utils.GetResolvedBackend(ctx, apiReconciler.client, backendNamespacedName, &api)
if resolvedBackend != nil {
backendMapping[backendNamespacedName.String()] = resolvedBackend
if _, exists := backendMapping[backendNamespacedName.String()]; !exists {
resolvedBackend := utils.GetResolvedBackend(ctx, apiReconciler.client, backendNamespacedName, &api)
if resolvedBackend != nil {
backendMapping[backendNamespacedName.String()] = resolvedBackend
}
}
}
}
Expand Down

0 comments on commit ccbcf15

Please sign in to comment.