Skip to content

Commit

Permalink
revert makedestionation changes
Browse files Browse the repository at this point in the history
Signed-off-by: luisr-escobar <luis.scobr@gmail.com>
  • Loading branch information
luisr-escobar authored Oct 1, 2024
1 parent 5d54158 commit ebbc4d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/router/istio.go
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ func mergeMatchConditions(canary, defaults []istiov1beta1.HTTPMatchRequest) []is
return merged
}

// makeDestination returns a destination weight for the specified host
// makeDestination returns a an destination weight for the specified host
func makeDestination(canary *flaggerv1.Canary, host string, weight int) istiov1beta1.HTTPRouteDestination {
dest := istiov1beta1.HTTPRouteDestination{
Destination: istiov1beta1.Destination{
Expand All @@ -720,7 +720,8 @@ func makeDestination(canary *flaggerv1.Canary, host string, weight int) istiov1b

// set destination port when an ingress gateway is specified
if canary.Spec.Service.PortDiscovery &&
!slices.Contains(canary.Spec.Service.Gateways, "mesh") || canary.Spec.Service.Delegation) {
(len(canary.Spec.Service.Gateways) > 0 &&
canary.Spec.Service.Gateways[0] != "mesh" || canary.Spec.Service.Delegation) {
dest = istiov1beta1.HTTPRouteDestination{
Destination: istiov1beta1.Destination{
Host: host,
Expand Down

0 comments on commit ebbc4d2

Please sign in to comment.